home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / imdisp79.zip / IMDISP.DOC < prev    next >
Text File  |  1992-08-09  |  112KB  |  2,559 lines

  1.  
  2.                   USER'S GUIDE FOR THE PDS IMDISP PROGRAM
  3.  
  4.  
  5.                                  Chapter 1
  6.  
  7.                                 INTRODUCTION
  8.  
  9.  
  10.      This document describes version 7.9 of the IMDISP program, an
  11. interactive image processing utility for the IBM Personal Computer family
  12. (PC, XT and AT) and compatibles.  It has been developed for use with the
  13. Compact Disk - Read-Only Memory (CD-ROM) storage systems currently being
  14. evaluated by the Planetary Data System (PDS). It can also be used to
  15. display and process images stored on floppy or hard disks.
  16.  
  17.      This User's Guide presents an overview of image processing and CD-ROM
  18. fundamentals, a section on the installation of IMDISP and CD-ROM software
  19. and hardware, a description of IMDISP program operation, a description of
  20. other utility programs which can be used in conjunction with IMDISP, and a
  21. command summary.
  22.  
  23.      Other support software for using the PDS CD-ROM disks has also been
  24. developed.  These packages include the USGS Planetary Image Cartography
  25. System (PICS) for MicroVAX computers, a set of FORTRAN routines to access
  26. CD-ROM disks on VAX computers (VMSCD), and "C" language source code to
  27. process disks written in the High Sierra format.  Contact Mike Martin
  28. (JPLPDS::MMARTIN on SPAN) for access to these tools.
  29.  
  30.  
  31.                                  Chapter 2
  32.  
  33.                                  BACKGROUND
  34.  
  35.  
  36.      Efforts to utilize small computer systems for display and analysis of
  37. scientific data have been hampered by the lack of sufficient data storage
  38. capacity to accommodate large image arrays.  Most planetary images require
  39. nearly a megabyte of storage.  Over the past two years a new storage
  40. technology, "CD-ROM", has been developed which provides the capability to
  41. store up to 600 megabytes of data on a single 4.72-inch disk.  The disks
  42. can be mass produced, and hundreds of copies of large digital archives
  43. distributed rather than the few sets currently produced.  Readers for
  44. CD-ROM disks can now be purchased for under a thousand dollars for use on
  45. personal computers and some science workstations.
  46.  
  47.    The PDS has worked with industry and other government agencies to
  48. support the development of CD-ROM as a major data distribution and storage
  49. media for space science data.  Initial development efforts by the PDS, the
  50. Voyager Project, and multi-disciplinary science representatives have
  51. resulted in the production of 12 CD-ROM disks containing about 30,000
  52. images from the Voyager 1 and 2 encounters.  The IMDISP program can be used
  53. to display most of these data files on a personal computer equipped with a
  54. CD-ROM drive.
  55.  
  56.    Any feedback on the use of IMDISP is greatly appreciated, and any of the
  57. following people can be contacted for reporting bugs, adding enhancements,
  58. etc:
  59.  
  60.       Mike Martin
  61.       Jet Propulsion Lab
  62.       Internet: mmartin@jplpds.jpl.nasa.gov
  63.       SPAN: JPLPDS::MMARTIN
  64.  
  65.       Ron Baalke
  66.       Jet Propulsion Lab
  67.       Internet: baalke@kelvin.jpl.nasa.gov
  68.  
  69.       Archie Warnock
  70.       Goddard Space Flight Center
  71.       SPAN:     NDADSA::WARNOCK
  72.       Internet: warnock@hypatia.gsfc.nasa.gov
  73.  
  74.  
  75. 2.1 DIGITAL IMAGE PROCESSING SUMMARY
  76.  
  77.  
  78.    A digital image is a picture converted to numerical form so that it can
  79. be stored and used in a computer.  The image is divided into a matrix of
  80. small regions called picture elements, or pixels.  The rows and columns of
  81. pixels are called "lines" and "samples", respectively. Each pixel has a
  82. numerical value, or DN (data number) value, quantifying the darkness or
  83. brightness of the image at that spot.  In total, each pixel has an address
  84. (line number, sample number) and a DN value, which is all that the computer
  85. needs for processing.  The DN value of each pixel usually represents a
  86. shade of darkness or brightness between black and white (gray levels).  How
  87. many gray levels there are in an image depends on the number of bits used
  88. to represent each pixel intensity in the computer.  The number of gray
  89. levels will be equal to 2^n, where n is the number of bits per pixel's DN
  90. value.  If 8 bits are used to represent a pixel's DN value (gray level),
  91. the system will be capable of using 2^8, or 256, gray levels in an image,
  92. where DN 0 is pure black, and DN 255 is pure white.  If each DN used only 4
  93. bits of storage, the image would contain only 2^4 or 16 gray levels; if
  94. there were only 1 bit per DN, the image would contain only black and white
  95. pixels (bit values of 0 or 1).
  96.  
  97.  
  98. 2.2 OVERVIEW OF IMDISP CAPABILITIES
  99.  
  100.  
  101.    While the specifics of IMDISP commands are discussed in Chapter 4, this
  102. section provides a general overview of how a user can manipulate images
  103. once a file is selected.  There are DISPLAY commands which allow the user
  104. to display all or part of an image at various positions on the display
  105. screen.  The user may also zoom in and out from a point on the image
  106. defined by the cursor, and may pan around the image.  The cursor may be
  107. turned on or off; when on, the arrow keys are used to move the cursor
  108. around the screen; when off, the cursor is not visible.
  109.  
  110.    A user may choose to "subsample" the image, to enable more or all of the
  111. original image to be displayed on the screen at once.  For example, if the
  112. image were subsampled by a factor of 2, every other pixel from every other
  113. line would be displayed, starting from the upper left corner of the image.
  114. If a factor of 3 were chosen, every third pixel from every third line would
  115. be displayed.  Any positive integer may be used for subsampling.
  116.  
  117.    The user may produce a histogram of an image file, which is a graph
  118. showing the number of pixels per DN value, or per range of DN values, for
  119. the entire image.  Histograms are overlaid on top of the image, but may be
  120. removed using the REFRESH command.  Subsampling may be specified when
  121. computing a histogram to reduce the time required for the calculations.
  122.  
  123.    A profile may be created which plots DN value versus pixel along a line
  124. between two points on the image.  After the cursor is used to select the
  125. two endpoints, the connecting line is drawn on the image and the profile is
  126. plotted at the bottom of the screen.  There is a plot command to plot the
  127. actual data values in an image line.
  128.  
  129.    The user may also "stretch" the image, which is analogous to turning the
  130. contrast knob on a TV set.  The user specifies low and high DN values; all
  131. pixels with values lower than the specified "low" become black, and all
  132. pixels higher than the specified "high" value become white.  All pixels
  133. between the low and high values are evenly shaded between black and white.
  134. IMDISP also has several filter functions available.  The user may process
  135. the image with a convolution filter, mean or median filters.  There is also
  136. an edge detection filter, as well as functions to brighten, darken and
  137. smear the displayed image.
  138.  
  139.    There are bookkeeping types of commands, also.  These allow the user to
  140. do such things as retrieve a desired image from the CD-ROM, to save an
  141. image to a file on hard disk, and to erase only the graphics from the
  142. screen or to erase the entire screen.  Users may execute batch command
  143. files to do a series of tasks automatically.  Lastly, the user may, of
  144. course, EXIT the IMDISP program when done.
  145.  
  146.  
  147. 2.3 GRAY LEVEL AND FALSE COLOR IMAGES
  148.  
  149.  
  150.    Most planetary images are composed of 8-bit DN values representing
  151. monochrome brightness levels in the scene.  To obtain color images,
  152. separate images are taken through color filters (red, green, blue) and are
  153. then combined by ground processing systems to produce a true color image.
  154. Only a very small fraction of planetary images are available in color
  155. versions.  Most display and analysis is done on monochrome images.
  156.  
  157.    A display with 256 (2^8) gray levels is required to present the
  158. information contained in a standard image.  However, the human eye can only
  159. distinguish about 32 gray levels.  Thus 5-bit DN values would satisfy most
  160. display requirements.  Unfortunately, computers are oriented to the storage
  161. of and manipulation of items which are a power of two, and 5-bit pixels
  162. would be very clumsy.  The standard display devices which the IMDISP
  163. program supports are limited to 16 gray levels (PGA and VGA), 4 gray levels
  164. (EGA) or 2 gray levels (CGA), but the program also supports several
  165. "enhanced" VGA display devices offering up to 256 colors (or 64 shades of
  166. gray).  The 16 gray levels of the PGA are adequate to support image
  167. analysis; however 4 or 2 gray levels are practically useless for viewing
  168. planetary images.  Fortunately the EGA display will support 16 different
  169. colors, and a color palette can be selected which uses a graduated scale of
  170. colors to represent gray levels, producing a "false color" image (false
  171. because the displayed color does not represent the actual color of the
  172. scene).
  173.  
  174.    A false color image (also called a pseudo color image) is created from a
  175. black and white image by assigning a color (rather than a gray level) to
  176. each DN value in the image.  For instance, a DN value of 128 could be
  177. reassigned to yellow if the user so desired.  Ranges of DNs (e.g., 100-125)
  178. may also be assigned one color.  Pseudo colors get assigned to DN values in
  179. a pseudo color table, which the display program then uses to determine how
  180. to color the image on the monitor.  Display programs often have preset
  181. pseudo color tables with commonly used DN-color combinations, and the user
  182. can simply call for one of these when generating a pseudo color image.  The
  183. option exists, of course, for users to generate their own pseudo color
  184. tables.  Pseudo colors are often used to highlight features of an unusual
  185. nature in an image.
  186.  
  187.    Since the Enhanced Graphic Adapter for the IBM PC provides only 4 gray
  188. shades (black, dark gray, light gray and white) most image viewing is done
  189. using a pseudo color table which interprets gray levels as color values
  190. ranging from black through reds, greens and blues up to white.
  191.  
  192.  
  193. 2.4 RADIOMETRIC AND GEOMETRIC CORRECTIONS
  194.  
  195.  
  196.    All camera systems have some kind of distortions in the lens, in the way
  197. the shutter works, etc.  Distortions in the amount of light transferred
  198. through the camera to the imaging plate are called radiometric distortions.
  199. Geometric distortion affects the "squareness" of an image, and is detected
  200. by taking an image of a geometric grid.
  201.  
  202.    For spacecraft cameras, both types of distortion can be measured before
  203. launch, and in a limited fashion, in flight.  These measured distortions
  204. are saved in digital files.  When a raw image is received, these
  205. "calibration files," as they are called, are subtracted from (or otherwise
  206. applied to) the image, effectively removing radiometric and geometric
  207. distortion.  This process is called radiometric and geometric correction.
  208. Corrected images contain the closest possible representation of the scene
  209. being imaged.
  210.  
  211.  
  212. 2.5 IMAGE FILE FORMATS
  213.  
  214.  
  215.    Digital image files are seldom stored as a simple array of pixels.
  216. Generally there is an area at the beginning of an image file containing
  217. descriptive information about the image.  This is referred to as a label or
  218. header area.  Figure 2-1 shows a diagram of a simple image format with a
  219. label area followed by the image lines.  In practice, images from planetary
  220. missions have a more complicated format, due to the need to store
  221. additional information to allow proper interpretation of the image data.
  222. Figure 2-2 shows the format of a Voyager image, which has engineering
  223. parameters embedded at the end of each image line to form a line suffix
  224. area, an engineering trailer record after the last image line, and this is
  225. followed by an image histogram.
  226.  
  227.  
  228.                        ┌────────────────────────┐
  229.                        │ Labels or Header Area  │
  230.                        ├────────────────────────┤
  231.                        │ Image Array Line 1     │
  232.                        ├────────────────────────┤
  233.                        │ Image Array Line 2     │
  234.                        └────────────────────────┘
  235.                                    .
  236.                                    .
  237.                                    .
  238.                        ┌────────────────────────┐
  239.                        │ Image Array Line n     │
  240.                        └────────────────────────┘
  241.  
  242.                     Figure 2-1: Simple Image Format
  243.  
  244.    Different image label formats have been developed for use by nearly all
  245. image processing facilities.  Two formats are widely used within the
  246. planetary and astronomy communities: the VICAR2 (Video Image Communication
  247. and Retrieval) labels used by the Multi-Mission Image Processing Laboratory
  248. (MIPL) and FITS (Flexible Image Transport) labels used for astronomy image
  249. interchange.  The PDS has developed a label scheme which is very similar to
  250. these standards, called the Object Description Language (ODL).  This format
  251. attempts to add a broader range of data descriptive capabilities to the
  252. proven capabilities of the existing label systems.
  253.  
  254.    Most of the images stored on the PDS CD-ROM disks have either ODL or
  255. VICAR2 labels.  IMDISP will automatically interpret these labels to
  256. determine the display format of the image data.
  257.  
  258.                  ┌────────────────────────────────────┐
  259.                  │ PDS ODL Labels                     │
  260.                  ├─────────────────────┬──────────────┤
  261.                  │ Image Array Line 1  │ Line Suffix  │
  262.                  ├─────────────────────┼──────────────┤
  263.                  │ Image Array Line 2  │ Line Suffix  │
  264.                  └─────────────────────┴──────────────┘
  265.                                    .
  266.                                    .
  267.                                    .
  268.                  ┌──────────────────────┬─────────────┐
  269.                  │ Image Array Line 800 │ Line Suffix │
  270.                  ├──────────────────────┴─────────────┤
  271.                  │ Image Engineering Trailer          │
  272.                  ├────────────────────────────────────┤
  273.                  │ Image Histogram                    │
  274.                  └────────────────────────────────────┘
  275.  
  276.                  Figure 2-2: Voyager CD-ROM Image Format
  277.  
  278.  
  279. 2.6 CD-ROM FUNDAMENTALS
  280.  
  281.  
  282.    The CD-ROM disk uses the same basic data storage format as a CD audio
  283. disk.  In fact, data blocks are identified by minute, second and sector
  284. number, following the audio format.  Data blocks are recorded along a
  285. spiral from the inner to the outer radius of the disk.  Each raw data block
  286. (sector) contains 2,352 bytes of information, with 304 bytes used for
  287. housekeeping and error correction and 2,048 (2K) containing user data. Each
  288. data block is called a sector, and 75 sectors are stored per second. Since
  289. the nominal playing time of a CD disk is 60 minutes, the data storage
  290. capacity is 75 sectors per second * 60 seconds per minute * 60 minutes or
  291. 270,000 sectors.  Thus the nominal storage capacity of a single CD-ROM disk
  292. is 540,000 kilobytes, which can be extended to more than 600,000 kilobytes
  293. and beyond by recording more than 60 minutes of data on a disk.
  294.  
  295.    In order to maximize the storage capacity of CD disks a constant linear
  296. velocity (CLV) recording format is used.  This means that the player
  297. changes speed (slows down) as it reads from the inside to the outside of
  298. the disk, to maintain a constant flow of data under the read mechanism at a
  299. speed of 1.2 meters per second.  This is in contrast to most magnetic disk
  300. drives which use constant angular velocity (CAV) storage, where the
  301. information density is greater on the inner tracks that the outer tracks.
  302. While the use of CLV recording increases the storage capacity of CD-ROM
  303. disks, it lengthens access time, since the disk must change speeds as it
  304. moves to different positions on the disk radius.  The strategy for locating
  305. a recorded data block is also more complicated than with constant angular
  306. velocity recording technology.
  307.  
  308.    As a result the average access time of CD-ROM drives is between 400 ms
  309. and 1 s, and the maximum data transfer rate to the host computer is 150
  310. kilobytes per second.  These rates are approximately an order of magnitude
  311. slower than magnetic disks.  Therefore, the access mechanisms to disk
  312. directories and data must be customized for CD-ROM in order to provide
  313. acceptable performance.
  314.  
  315.    The development of a standard logical format for recording data files on
  316. CD-ROM disks was taken on by a group of CD-ROM applications developers,
  317. hardware vendors and computer vendors.  The proposed standard resulting
  318. from this initial effort was called the High Sierra format. This format was
  319. submitted to the International Standards Organization (ISO) for
  320. consideration and approved on October 5, 1987. It is now referred to as the
  321. ISO-9660 standard.  The format used for the early PDS CD-ROM disks is dated
  322. May 28, 1986, and differs slightly from the final ISO standard.  Microsoft
  323. and other CD-ROM software developers have committed to supporting this
  324. preliminary version of the format in later software releases.  However,
  325. software developed by other vendors to support the ISO format (DEC for
  326. example) will not support the format of these early disks.
  327.  
  328.  
  329.  
  330.                                Chapter 3
  331.  
  332.                           IMDISP INSTALLATION
  333.  
  334.  
  335.    IMDISP requires an IBM PC, XT, AT or 100 percent compatible with 512K of
  336. base memory.  It supports several graphics display devices, including the
  337. Enhanced Graphics Adapter (EGA), the Video Graphics Array (VGA), the
  338. Professional Graphics Adapter (PGA), and the Color Graphics Adapter (CGA).
  339. The hardware environment in which the program has been developed and tested
  340. includes and AT class computer, deluxe or enhanced EGA board with 256K of
  341. memory, selected VGA boards with 512K or 1MB memory, and MultiSync (tm) or
  342. multiscan monitor.
  343.  
  344.  
  345. 3.1 PROGRAM SETUP
  346.  
  347.  
  348.    The IMDISP program can be run from a floppy or hard disk.  To use the
  349. program from a floppy disk, insert the program disk in the A: or B: drive
  350. and type the MS-DOS command: "A:" or "B:" to set the floppy disk as the
  351. default drive.  To use the program from hard disk first create a directory
  352. to hold the IMDISP files.  Use the MS-DOS command "MKDIR \IMDISP" to create
  353. a directory to hold the programs.  Use the "CHDIR \IMDISP" command to make
  354. IMDISP the default directory.  Insert the distribution floppy disk in
  355. floppy disk drive A:.  Now type "COPY A:*.*" to copy the files from the
  356. distribution disk to your hard disk.  You should now be able to run all
  357. examples from that directory on your hard disk.  If you wish to use IMDISP
  358. from other directories, you need to include the IMDISP directory in your
  359. MS-DOS "PATH" command.  This command provides MS-DOS with a list of
  360. directories to search when looking for a program file to run.  If you wish
  361. to run IMDISP from different directories, the \IMDISP subdirectory should
  362. be added to the PATH command in your AUTOEXEC.BAT file.  A sample path
  363. command would look like this:
  364.  
  365.                  PATH=C:\DOS;C:\UTIL;C:\WORDSTAR;C:\IMDISP
  366.  
  367.    You may want to add a line to your AUTOEXEC.BAT file which will allow
  368. you to abort the display program while running batch files or displaying
  369. large image files.  If the command "BREAK=ON" is placed in CONFIG.SYS, you
  370. will (sometimes) be able to terminate the IMDISP program by typing the
  371. control and break keys simultaneously.  Different computer systems offer
  372. varying response to the control-break command, and the use of this command
  373. may effect other programs you use.
  374.  
  375.    You can set IMDISP to start up in the correct display mode for your
  376. video system by specifying the environment variable IMDISP in your
  377. AUTOEXEC.BAT file.  A sample command to do this would look like this:
  378.  
  379.                             SET IMDISP=ORCHID800
  380.  
  381. if you have an Orchid ProDesigner super VGA board with 512K of video
  382. memory.  See section 3.3 for a description of all the possible supported
  383. video modes.
  384.  
  385.    IMDISP also builds various scratch files for use when browsing images or
  386. executing DOS functions.  By default, they go in the root directory on
  387. drive C:.  If you wish to have them written somewhere else, you may do that
  388. by specifying the desired directory in the environment variable IMBROWSE. A
  389. sample command to do this would look like this:
  390.  
  391.                            SET IMBROWSE=D:\TEMP\
  392.  
  393. This will make IMDISP write its scratch files in the subdirectory TEMP on
  394. drive D:.  Note that the final backslash (\) is required.  We recommend
  395. that the drive specified by IMBROWSE have at least 512K of free space - the
  396. scratch file written when using any of the DOS system calls can be as large
  397. as that.
  398.  
  399. Also, if you have a collection of color palettes in a separate
  400. subdirectory, you can specify this directory as being the default palette
  401. directory.  For example:
  402.  
  403.                      SET IMPALETTE=D:\IMAGES\PALETTES\
  404.  
  405. will tell IMDISP to look in the D:\IMAGES\PALETTES directory first when
  406. loading in a color palette with the PAL LOAD command.
  407.  
  408. IMDISP can use extended memory, managed by an XMS memory driver like
  409. HIMEM.SYS or QEMM, for its refresh buffer.  If no extended memory is
  410. available, IMDISP will not set up a refresh buffer by default, but will
  411. allow the user to open a disk file to be used for refreshing the screen. In
  412. this case, the environment variable IMREFRESH defines where the refresh
  413. buffer is to go, so
  414.  
  415.                              SET IMREFRESH=G:\
  416.  
  417. tells IMDISP to put the refresh buffer in the root directory of drive G:.
  418. Note that the refresh buffer can be quite large - a 1024x768 display will
  419. require 768K of disk space (or XMS memory) to hold the entire buffer.
  420.  
  421.  
  422. 3.2 CD-ROM SETUP
  423.  
  424.  
  425.    To use the IMDISP program with PDS CD-ROM disks you will need a CD-ROM
  426. reader, interface board, and software provided by the vendor which will
  427. make your CD Reader look like a disk drive to your PC.  The details of
  428. setting up your hardware and software configuration are beyond the scope of
  429. this manual, however several aspects of setup will be reviewed.
  430.  
  431.    There are many potential pitfalls in setting up your hardware and
  432. interface board.  Read the directions carefully, and don't assume that
  433. "default" switch settings are correct.  Check all switches to see that they
  434. correspond to the recommended settings.
  435.  
  436.    To work properly with the batch command and label files provided with
  437. IMDISP, your CD-ROM drive should be set up to be drive letter "L:". Most
  438. vendor software allows you to select the drive letter which will be
  439. assigned to the CD-ROM reader.
  440.  
  441.  
  442. 3.2.1 Microsoft Extensions
  443.  
  444.  
  445.    If you are using the Microsoft Extensions you will load a CD-ROM device
  446. driver as part of your CONFIG.SYS file (or two drivers if using the Philips
  447. or DEC readers) with a line like this:
  448.  
  449.    DEVICE=HITACHI.SYS /D:CDROM1 /N:1
  450.  
  451. This command assumes that the driver file "HITACHI.SYS"is located in your
  452. ROOT directory.  The /D:CDROM1 switch assigns a logical name CDROM1 to the
  453. drive.  A name must be supplied, and is used to identify this device, in
  454. case more than one CD-ROM drive is being used on your system. The name
  455. should not be the same as the name of any file stored on your system.  An
  456. attempt to open a file with the same name as the device driver will result
  457. in the device driver being opened, not the file.  The /N:1 switch indicates
  458. that this is drive 1.  This switch is used since some CD-ROM interface
  459. cards support multiple drives.
  460.  
  461.    Other commands which should be included in CONFIG.SYS if you are using a
  462. CD-ROM drive with the Microsoft Extensions are:
  463.  
  464.    LASTDRIVE=Z
  465.    FILES=30
  466.    BUFFERS=50
  467.  
  468.    The LASTDRIVE command tells MS-DOS to allow for enough drive letters to
  469. support the CD-ROM drive, plus any other drives on your system. Using
  470. LASTDRIVE=L should also work in most circumstances.  The files and buffers
  471. specifications provide sufficient system work area to support CD-ROM
  472. operations.
  473.  
  474.    You must also execute a program called MSCDEX.EXE which allows access to
  475. the CD-ROM drive as if it were a disk drive on your system.  This command
  476. can be put in your AUTOEXEC.BAT file so that it is automatically run
  477. whenever you start-up your computer.  The command format is:
  478.  
  479.    MSCDEX /D:CDROM1 /L:L /M:20 /V /E
  480.  
  481.    Several MSCDEX command switches are illustrated.  The /L:L command
  482. assigns the drive name L: to the CD-ROM drive.  The /D switch gives the
  483. device name of the CD-ROM drive (which must be the same name used in the
  484. device name parameter of  the "DEVICE=CDROM.SYS" command in the CONFIG.SYS
  485. file.  The /M:20 switch assigns twenty 2K blocks of memory as a buffer for
  486. use with CD-ROM data.  The /V switch provides verbose messages when the
  487. installation program is run, and /E tells the program to use expanded
  488. memory for the cache area.
  489.  
  490.  
  491. 3.2.2 Other Driver Software
  492.  
  493.  
  494.    Some vendors (Reference Technology, TMS) offer CD-ROM software which is
  495. comparable to the Microsoft Extensions.  Our experience with these software
  496. packages is that they modify the internals of MS-DOS and may cause
  497. unpredictable results with your other PC software.  They often do not
  498. support CD-ROM applications designed to work with the MS-DOS extensions for
  499. CD-ROM and cannot be used with the IMDISP FILE prompt mode.
  500.  
  501.  
  502. 3.2.3 Problems with CD-ROM Software
  503.  
  504.  
  505.    The PDS CD-ROM disks utilize a feature of the CD-ROM format standard
  506. which provides extended attribute records to define the physical
  507. characteristics of data files.  These records will be used by VAX and other
  508. minicomputer systems where the operating system allows a variety of record
  509. formats (fixed, variable, stream).  Many of the earlier implementations of
  510. High Sierra software failed to recognize these records, which are placed at
  511. the beginning of a file's data area.  If your CD-ROM software was developed
  512. prior to April 1987, it may interpret these records as part of the data
  513. file, causing the first 2K bytes of each file to appear as meaningless
  514. binary data.  Users with this problem should contact their hardware or
  515. software vendors for updated versions of the CD-ROM software.  The IMDISP
  516. program has been patched to recognize and skip over these records on the
  517. PDS CD-ROM disks, but these patches may not support other CD-ROM disks with
  518. extended attribute records.
  519.  
  520.  
  521. 3.3 DISPLAY DEVICE CHARACTERISTICS
  522.  
  523.  
  524.    IMDISP automatically finds out which display devices are available (PGA,
  525. EGA, or CGA) and uses the one available.  The Enhanced Graphics Adapter
  526. must have at least 128K of memory to work properly.  Use of the Color
  527. Graphics Adapter is discouraged because the pixels have no gray levels,
  528. only black or white.
  529.  
  530.    The display coordinates start at (1,1) in the upper left corner of the
  531. screen; the line direction is down and the sample direction is to the
  532. right.
  533.  
  534.  
  535. 3.3.1 Enhanced Graphics Adapter (EGA)
  536.  
  537.  
  538.    The EGA is a bit-mapped display device providing a resolution of 350
  539. lines by 640 samples of 4-bits each.  It produces a digital video signal
  540. for each primary color (red, green and blue), The video signal for each
  541. color can be set to one of four levels, roughly equivalent to off, low,
  542. medium and high.  Thus the number of possible colors (color palette) is 64
  543. (4^3).  The following table illustrates the colors created by some of the
  544. different combinations of red, green and blue.
  545.  
  546.       Red=   off, Green=   off, Blue=   off  results in Black
  547.       Red=   low, Green=   off, Blue=   off  results in Dark Red
  548.       Red=medium, Green=   off, Blue=   off  results in Light Red
  549.       Red=  high, Green=   off, Blue=   off  results in Bright Red
  550.       Red=   low, Green=   low, Blue=   low  results in Dark Gray
  551.       Red=medium, Green=   low, Blue=   off  results in Brown
  552.       Red=medium, Green=medium, Blue=   off  results in Yellow
  553.       Red=medium, Green=medium, Blue=medium  results in Light Gray
  554.       Red=  high, Green=   low, Blue=   off  results in Orange
  555.       Red=  high, Green=  high, Blue=  high  results in White
  556.  
  557.               Table 3-1: Sample EGA Color Palette Settings
  558.  
  559.  
  560.    The EGA display is limited to only 16 colors out of the 64 possible,
  561. because only 4-bits are used to store each pixel value in memory.  This
  562. 4-bit pixel value points to an entry in the color table which represents
  563. one of the 64 possible combinations of red, green and blue which can be
  564. displayed.
  565.  
  566.    Many of the newer EGA boards are capable of displaying additional lines
  567. and samples when using a MultiSync (tm) or Multiscan monitor.  The standard
  568. EGA uses a 16 Mhz crystal oscillator (something like a clock which
  569. regulates the display speed), which limits the video output rate to the
  570. equivalent of 640 pixels by 350 lines.  The EGA circuitry allows for a
  571. faster crystal oscillator to be added to the board (24 Mhz and beyond)
  572. allowing about 25 percent more lines to be displayed (480 lines instead of
  573. 350).  A method for adding this capability to an existing EGA board (for
  574. about $10 worth of parts) is described in the September 16, 1986 issue of
  575. PC Magazine.
  576.  
  577.    This mode requires that a MultiSync (tm) or multiscan monitor be
  578. attached to the computer, and there is no way for the program to
  579. automatically detect the presence of the special monitor.  Therefore this
  580. display mode is invoked by specifying an MS-DOS "ENVIRONMENT" variable.
  581. This is done by issuing an MS-DOS "SET" command at the MS-DOS prompt as
  582. follows:
  583.  
  584.    SET IMDISP=EGA480
  585.  
  586.    This command can also be put in your AUTOEXEC.BAT file using a text
  587. editor, so that you need not invoke it each time you run IMDISP.  It should
  588. have no effect on other MS-DOS system operations.  There is a chance that
  589. adding this variable will exceed the size reserved by MS-DOS for environment
  590. variables.  If so, you should consult your MS-DOS manual to increase the
  591. environment size on your system.  The environment variable can be removed
  592. with the MS-DOS command:
  593.  
  594.    SET IMDISP=
  595.  
  596. where a carriage return is typed immediately after the equal sign. The 480
  597. line mode requires an additional 83K of memory for the refresh buffer.  If
  598. you try this mode and receive the message "Insufficient memory for line
  599. buffer", it is probably because you have a 512K memory machine, or have
  600. memory resident programs operating (like Sidekick or Superkey) which reduce
  601. the available memory to less than about 400K. You will need to use the 350
  602. line mode or remove some memory resident programs to operate in 480 line
  603. mode.
  604.  
  605.    Users of the EGA with MultiSync (tm) and Multiscan monitors can achieve
  606. a 16 gray level display through the use of a special device called the
  607. Grayscaler 1, from Avocado Computer, Box 632, Yorba Linda, Ca, 92686, (714)
  608. 528-1025.  This cable converts the digital video signals produced by the
  609. EGA board to analog signals.  By selecting appropriate EGA palette entries,
  610. a fairly good representation of 16 gray levels can be achieved (use the
  611. palette selection "PAL LOAD GRAY16.PAL" to select this palette).
  612.  
  613.  
  614. 3.3.2 Video Graphics Array (VGA)
  615.  
  616.  
  617.    This version (5.7) of the IMDISP program includes support for the IBM
  618. Video Graphics Array (VGA) display device.  The VGA produces an analog
  619. display with several new color modes.  Of particular interest to IMDISP
  620. users are the 640 x 480 line mode with 16 displayable colors (or gray
  621. levels).  The 320 x 200 line mode with 256 displayable colors (or 64 gray
  622. levels) has been tested but produces very blocky pixels.  This version of
  623. IMDISP also supports a number super VGA graphic boards (see below).
  624.  
  625.    To set the VGA display mode you must set a MS-DOS environment variable
  626. prior to executing IMDISP.
  627.  
  628.    To set the environment variable use the MS-DOS command:
  629.  
  630.    SET IMDISP=VGA
  631.  
  632. This will put the display in 640 sample by 480 line mode, with 16 gray
  633. levels or colors displayable from a palette of 256K.  The display is
  634. initialized with a gray scale palette, but a pseudocolor palette can be
  635. invoked with the IMDISP command "PAL PS 0".  The "PALETTE EDIT" command
  636. will allow you to step forward or backward through the 64 available shades
  637. for each primary color.  See the next section of the IMDISP manual for more
  638. information on the palette edit function.
  639.  
  640.  
  641.    Users may experiment with the 320 x 200 VGA mode by using
  642.  
  643.    SET IMDISP=VGA320
  644.  
  645. The pixels are rather large in this mode, but there are enough colors to
  646. display images nicely.
  647.  
  648.  
  649. 3.3.3 Professional Graphics Adapter (PGA)
  650.  
  651.  
  652.    The PGA is a special graphics board developed by IBM for use with
  653. CAD/CAM applications on the IBM PC.  Because its architecture is
  654. incompatible with the CGA and EGA boards, it has not been well received by
  655. software developers.  The PGA provides an analog video signal with a
  656. display resolution of 480 lines by 640 samples of 8-bits each.  It provides
  657. 16 intensities for each primary color, resulting in a palette of 4,096
  658. colors (16^3).  The color table allows 256 colors to be displayed
  659. simultaneously, however only 16 gray levels can be selected.
  660.  
  661.    Use the command:
  662.  
  663.    SET IMDISP=PGA
  664.  
  665. at the MS-DOS prompt to force IMDISP to go into PGA display mode.
  666.  
  667.  
  668. 3.3.4 Color Graphics Adapter (CGA)
  669.  
  670.  
  671.    The CGA display is a bit-mapped graphics device with a resolution of 200
  672. lines by 640 samples of 1-bit each.  It supports only 2 colors in this
  673. display mode, black and white.  This display can be used to get a general
  674. idea of the contents of a digital image, or for displaying one bit images
  675. (graphics for example) but is not recommended for use with the PDS CD-ROM
  676. images.
  677.  
  678.    To force a multi-function display card into CGA mode, use:
  679.  
  680.    SET IMDISP=CGA
  681.  
  682.  
  683. 3.3.5 Super VGA Display Boards
  684.  
  685.  
  686.    Several high resolution display boards are supported by this version of
  687. IMDISP.   Most of them support resolutions with 256 colors or 64 grayscale
  688. levels.  Select one from the following list if it matches your display
  689. board:
  690.  
  691.        SET IMDISP=     Resolution     Board Name
  692.            ATI640      640x480x256    ATI VGA Wonder Board (512K)
  693.            ATI800      800x600x256    ATI VGA Wonder Board (512K)
  694.            ATI1024     1024x768x16    ATI VGA Wonder Board (512K)
  695.            EVGA512     512x480x256    Everex EV-673 Board  (256K)
  696.            EVGA640     640x400x256    Everex EV-673 Board  (256K)
  697.            ORCHID      640x480x256    Orchid ProDesigner+ Board (512K)
  698.            ORCHID800   800x600x256    Orchid ProDesigner+ Board (512K)
  699.            ORCHID1024 1024x768x256    Orchid ProDesigner+ Board (1MB)
  700.            PARADISE    640x480x256    Paradise VGA Board (400 lines if the
  701.                                       board has 256K of memory)
  702.            TRIDENT     640x480x256    Trident-based SVGA boards (512K)
  703.            VESA       1024x768x256    VESA SVGA Interface (1MB) (test)
  704.  
  705.  
  706. 3.4 MULTIPLE BUFFERS
  707.  
  708. Multiple copies of images (or the entire screen) can now be copied and
  709. stored away into buffers, limited by the available memory.  If you don't
  710. have enough memory, the buffers can still be used, but as virtual files
  711. (see HINTS & TIPS ON CONSERVING MEMORY, down below).  Using the buffers,
  712. images can now be merged together to create interesting effects.  You can
  713. add or subtract images from each other.  You can store an image away into a
  714. buffer before applying a filter, and if you didn't like the result, then
  715. retrieve it back from the buffer, effectively creating an UNDO feature. You
  716. can create a "face-on-Venus image" by merging the face-on-Mars image with a
  717. Magellan image.
  718.  
  719. There are 26 buffers available in IMDISP, limited by memory or disk space.
  720. The buffers are referenced by name as a single letter, one for each letter
  721. of the alphabet (A-Z).
  722.  
  723.  
  724. 3.5 HINTS & TIPS ON CONSERVING MEMORY
  725.  
  726. If you have no extended memory, or don't have enough extended memory, don't
  727. despair.  You can still use the buffers if you use the following tips to
  728. help you maximize the use of the memory
  729.  
  730.      o IMDISP will automatically create a refresh buffer in extended memory
  731.        whose size is the size of the screen.  You can disable the refresh
  732.        buffer and this memory will be freed up for buffer use.  To disable
  733.        the refresh buffer, type:
  734.  
  735.            SET REFRESH OFF
  736.  
  737.        The refresh buffer can be enabled with
  738.  
  739.            SET REFRESH ON
  740.  
  741.      o IMDISP will also attempt to load an entire image into extended
  742.        memory whenever you do the FILE command.  You can have IMDISP not do
  743.        this by using the NOMEMORY option:
  744.  
  745.            FILE IO.IMG NOMEMORY
  746.  
  747.      o If you are using a Super VGA graphics card in its highest
  748.        resolution, then if you switch to a lower screen resolution, this
  749.        will generally cause the buffers to be smaller.  For example, if you
  750.        using an Orchid Pro Designer II card in its highest resolution
  751.        (1024x768), then you can switch to the 800x600 or 640x480 screen
  752.        resolutions:
  753.  
  754.             SET DIS ORCHID800
  755.             SET DIS ORCHID
  756.  
  757.      o Subsample the image so that it doesn't take up the entire screen,
  758.        which then can be saved to smaller buffers:
  759.  
  760.              DISP SUB 3
  761.  
  762.      o Use the FILE option on the COPY or MERGE commands to store buffers
  763.        into a file instead of extended memory.
  764.  
  765.      o Erase any unused buffers:
  766.  
  767.               ERASE A
  768.  
  769. 3.6 THE HELP FILE
  770.  
  771.    The HELP command in IMDISP uses a plain text file, called IMDISP.HLP,
  772. which contains brief summaries of each command and its options.  This file
  773. can be modified as you wish with any text editor or word processor capable
  774. of saving files in plain ASCII format.
  775.  
  776.    IMDISP looks in several places to try to find the help file when the
  777. program starts.  First, the DOS environment is searched for the environment
  778. variable IMHELP.  If IMHELP is found, and contains a file name, the program
  779. will attempt to open that file (so you can call the help file anything you
  780. want).  If IMHELP contains only the name of a subdirectory, the program
  781. will attempt to open IMDISP.HLP in that directory.  If that fails, or if
  782. IMHELP is not set, the program then looks in the current directory for
  783. IMDISP.HLP.  If IMDISP.HLP isn't found in the current directory, and if you
  784. are using MS-DOS v3.3 or later, the program tries to open the help file in
  785. the directory where the IMDISP.EXE program file is located.  If all these
  786. fail, the program reports that it can't open the help file and continues.
  787.  
  788.    For example, to use a file called MYHELP.IMD, located in the
  789. subdirectory C:\HELPFILES, instead of using the default file IMDISP.HLP,
  790. issue the command
  791.  
  792.       SET IMHELP=C:\HELPFILES\MYHELP.IMD
  793.  
  794. either at the DOS prompt or in your AUTOEXEC.BAT file.  To use the file
  795. IMDISP.HLP, but to allow the program to find it in the subdirectory
  796. C:\HELPFILES, issue the command
  797.  
  798.       SET IMHELP=C:\HELPFILES
  799.  
  800. or
  801.  
  802.       SET IMHELP=C:\HELPFILES\
  803.  
  804.                                  Chapter 4
  805.  
  806.                               IMDISP OPERATION
  807.  
  808.  
  809.    IMDISP can be used to display images up to several thousand lines and
  810. samples with a variety of pixel formats.  These formats include bit (1
  811. bit), nibble (4 bits), byte (8 bits), integer (16 bits) or long integer (32
  812. bits).  Integer pixels may be byte-swapped, which means that the sign and
  813. most significant 7 bits are in the rightmost byte, and the least
  814. significant 8 bits are in the leftmost byte.  This is the convention used
  815. by both the IBM PC and VAX computer hardware families. IBM mainframes and
  816. 68000 series computers (Macintosh and Sun, for example) use
  817. non-byte-swapped integers.
  818.  
  819.    Program interaction with the user is via commands typed in response to
  820. the "COMMAND:" prompt.  Most interaction is performed on the graphic
  821. display screen, and program messages are printed over any image display
  822. currently on the screen.  The REFRESH command can be used to restore an
  823. image after other commands have written text over the display.  The ERASE
  824. command can be used to clear away the clutter left by program status
  825. messages and previously displayed images.  The screen is not automatically
  826. erased after each operation in order that multiple images can be displayed
  827. simultaneously, or so a histogram can be placed on the screen with the
  828. image.
  829.  
  830.    IMDISP is invoked by typing "IMDISP" or "IMDISP filename", where
  831. filename is the name of an image file to be opened for processing at
  832. program start-up.  The filename may include a disk drive and path name
  833. specification.
  834.  
  835.    The program will blank the display screen and display a welcome logo,
  836. then the prompt "COMMAND:" will appear in the lower left portion of the
  837. screen.  If a filename is included in the command invocation, the welcome
  838. message is not displayed and the screen will display the COMMAND: prompt.
  839.  
  840.    Typing "HELP" at the command prompt will provide a list of IMDISP
  841. commands.  The most frequently used commands are "FILE" to open a file for
  842. processing, and "DISPLAY" to display an image once the file has been
  843. opened.
  844.  
  845.    Previous commands can be recalled for editing, so you don't have to type
  846. them over again.  Use the up arrow (or cursor up) key to recall old
  847. commands.  The left and right arrow (cursor) keys move you back and forth
  848. in the command.  Make whatever changes you want, then press the Enter key
  849. to execute the command.
  850.  
  851.  
  852. 4.1 COMMAND SYNTAX
  853.  
  854.  
  855.    The command line syntax is of the form:
  856.  
  857.   COMMAND KEYWORD1 = VALUE1 KEYWORD2=VALUE2 KEYWORD3 VALUE3 ...
  858.  
  859.    The command line may be typed in either upper or lower case.  The
  860. command and the keyword names may be abbreviated to 3 characters in most
  861. cases.  Any number of spaces may be inserted between words, and the keyword
  862. and value may be separated by a space or an equals sign.  Some keywords do
  863. not require a value.  All keywords are optional and have default values.
  864.  
  865.  
  866. 4.2 COMMAND DESCRIPTION
  867.  
  868.  
  869.    Table 4-1 presents a summary of IMDISP commands.  They are separated
  870. into 3 groups, file manipulation commands; display commands and program
  871. control commands.  Only the capitalized letters are required to specify a
  872. command.
  873.  
  874.  
  875. 4.3 OPERATING MODES
  876.  
  877.  
  878.    Several of the commands invoke special program operating modes. These
  879. include the FILE command when issued without a filename argument and the
  880. CURSOR, PROFILE and PALETTE EDIT commands.  The FILE mode displays a list
  881. of files in the current directory on the screen for selection.  It also
  882. contains several subcommands for controlling the display of files on the
  883. menu screen.  In the CURSOR, PROFILE and PALETTE EDIT commands the cursor
  884. keys (arrow keys) on the numeric keypad are used in conjunction with other
  885. keys to control program operation.  These modes are exited by typing either
  886. a period '.' or carriage return.
  887.  
  888. File oriented commands:
  889.  
  890.     CD or CHDIR .  .  .  .  to change the default directory
  891.     DIRECTORY   .  .  .  .  to perform the MS-DOS directory command
  892.     FILE        .  .  .  .  to specify the name of the image
  893.     LABEL       .  .  .  .  to display the image labels
  894.     LOG         .  .  .  .  to save (log) commands to a text file
  895.     SAVE        .  .  .  .  to save the image display to a file
  896.     TYPE        .  .  .  .  to perform the MS-DOS type command
  897.  
  898. Display commands:
  899.  
  900.     BROWSE      .  .  .  .  to display a group of images
  901.     CURSOR      .  .  .  .  to move the cursor around
  902.     DISPLAY     .  .  .  .  to display the image
  903.     ERASE       .  .  .  .  to erase the display
  904.     HISTOGRAM   .  .  .  .  to display the histogram of the image
  905.     OVERLAY     .  .  .  .  to place an overlay on the image
  906.     PALETTE     .  .  .  .  to adjust the palette for the display
  907.     PERSPECTIVE .  .  .  .  to plot a pseudo-perspective of the image
  908.     PLOT        .  .  .  .  to plot image lines and spectra on the display
  909.     PROFILE     .  .  .  .  to plot a profile of the image
  910.     REFRESH     .  .  .  .  to refresh the image plane
  911.     SET         .  .  .  .  to set display options
  912.     TEXT        .  .  .  .  to draw text on the image
  913.  
  914. Image processing commands:
  915.  
  916.     BRIGHTEN    .  .  .  .  to brighten the image
  917.     COPY        .  .  .  .  to copy images to/from memory buffers
  918.     DARKEN      .  .  .  .  to darken the image
  919.     ENHANCE     .  .  .  .  to apply various filters to the image:
  920.          BAALKE
  921.          CONVOLUTION
  922.          EDGE
  923.          HIGH
  924.          HISTOGRAM
  925.          LOG
  926.          MEAN
  927.          MEDIAN
  928.          POWER
  929.          STAIR
  930.          SMEAR
  931.          UNSHARP
  932.     MASK        .  .  .  .  to mask off pixels in the image
  933.     MERGE       .  .  .  .  to combine image and memory buffers
  934.     NEG         .  .  .  .  to invert the color palette
  935.     PALETTE     .  .  .  .  to adjust the palette for the display
  936.     ROTATE      .  .  .  .  to rotate the image
  937.     SLANT       .  .  .  .  to slant the image to the right or left
  938.     STRETCH     .  .  .  .  to do a linear gray scale stretch
  939.     WINDOW      .  .  .  .  to mark off a subimage on the screen
  940.  
  941.  
  942. Program control commands:
  943.  
  944.     BATCH       .  .  .  .  to execute a batch command file
  945.     EXIT or QUIT.  .  .  .  to exit from the program
  946.     HELP        .  .  .  .  Display help information
  947.     MENU        .  .  .  .  to select images from a menu file
  948.     SYSTEM      .  .  .  .  execute an MS-DOS command
  949.  
  950.          Table 4-1: IMDISP Command Summary
  951.  
  952.  
  953. 4.4 ERROR HANDLING
  954.  
  955.  
  956.    If an invalid command is issued at the COMMAND: prompt the program will
  957. beep and return to the COMMAND: prompt.  In handling command parameters the
  958. program takes action on those parameters that are recognized, but ignores
  959. invalid parameters.
  960.  
  961.    It is also possible for certain system errors to be encountered which
  962. cause the program to abort leaving your computer in graphics mode.  If you
  963. are using certain utilities which reset the default text mode screen colors
  964. (like the Norton Utilities screen attributes command) you may not be able
  965. to see what is being printed on the screen.  The simplest approach is to
  966. perform a warm boot, by typing the Ctrl, Alt, Del  keys simultaneously.
  967. Alternately, you can often type IMDISP then EXIT to reset the computer to
  968. text mode.  Errors in processing image files on CD-ROM, hard disk or floppy
  969. disks can cause these aborts.
  970.  
  971.  
  972. 4.5 COMMAND REFERENCE
  973.  
  974.  
  975.    This section lists all IMDISP commands alphabetically and describes
  976. their function, parameters which control  command operation, and provides
  977. examples of command use, In the command and parameter description the
  978. following conventions are used:
  979.  
  980.    filename    represents the name of an MS-DOS file, and may include an
  981.                optional drive identifier and path specification.
  982.  
  983.    n           represents an integer value.
  984.  
  985.  
  986. 4.5.1 BATCH
  987.  
  988.  
  989.    The BATCH command reads commands from the specified batch command file.
  990. If no file name is specified the current directory is searched for a file
  991. named BATCH.CMD.  The CURSOR, PROFILE and PALETTE EDIT commands should not
  992. be used within batch command files since they require interactive inputs
  993. from the keyboard.  Batch files may be nested.
  994.  
  995.    The BATCH command may take the following argument:
  996.  
  997.    filename    filename of batch command file.
  998.  
  999.    A batch file is simply a text file containing a list of commands, with
  1000. each command terminated by a carriage return.  You can add comments to a
  1001. batch file by putting a semi-colon on the line.  Everything from the
  1002. semi-colon to the end of the line is ignored.  If the command file is
  1003. created with a word processor, the program should be used in the
  1004. non-document mode, to assure that carriage returns are embedded between
  1005. command lines.  An example of creating a batch file to display the PDS logo
  1006. image follows.
  1007.  
  1008.    At the MS-DOS command level type:
  1009.  
  1010.    COPY CON TEST.CMD
  1011.    FILE LOGO.IMG
  1012.    DISP ZOOM 4
  1013.    DISP ZOOM 2
  1014.    DISP
  1015.    DISP SUB 2
  1016.    EXIT
  1017.  
  1018.    Now run IMDISP and type "BATCH TEST.CMD" at the "COMMAND:" prompt. Make
  1019. sure the file "LOGO.IMG" is in your current directory.  The PDS logo should
  1020. be displayed on the screen in several different sizes.
  1021.  
  1022.  
  1023. 4.5.2 BRIGHTEN
  1024.  
  1025.    The BRIGHTEN command adds a constant value to all pixels in the
  1026. displayed image.  If no value is specified, the default is 10% of the total
  1027. range of DN values (i.e., 2 will be added to all pixels in 16-color modes,
  1028. 26 will be added in 256 color modes).
  1029.  
  1030.     Examples:
  1031.  
  1032.        BRIGHTEN
  1033.        BRIGHTEN 50
  1034.  
  1035. 4.5.3 BROWSE
  1036.  
  1037.  
  1038.    The BROWSE command will display all images in a directory one after
  1039. another.  An optional directory mask can be supplied to display only
  1040. selected files ("BROWSE *.IMG").  The command creates a list of files to be
  1041. displayed, then creates and executes a batch command file to display those
  1042. images.  After each image is displayed, the filename is displayed at the
  1043. top of the image.  A BROWSE session can be interrupted by pressing
  1044. control-s, then restarted by pressing control-q TWICE.  A session can be
  1045. halted by typing any other key during the display.  It can then be
  1046. restarted (from the beginning) with the command "BROWSE C:BATCH.CMD". The
  1047. default file name for the batch file created by the BROWSE command is
  1048. "C:BATCH.CMD".  This name can be changed using the "SET BROWSE fname"
  1049. command where fname can consist of a drive letter and filename, which
  1050. should be terminated  with the extension ".CMD".  It can also be set from
  1051. DOS or in your AUTOEXEC.BAT file by using the environment variable
  1052. IMBROWSE.   For example, the DOS command
  1053.  
  1054.    SET IMBROWSE=D:\TEMP\BROWSE.CMD
  1055.  
  1056. will make the BROWSE command file in the subdirectory TEMP on drive D:.
  1057.  
  1058.    The BROWSE command has one argument and several optional keywords.
  1059.  
  1060.    fname         optional file selection mask (must immediately follow the
  1061.                  command BROWSE).
  1062.                  Examples: *.img, D:\IMAGES\*.IMG, L:*.BRS.
  1063.  
  1064.    SIZe n        allows the display of multiple images on the screen.  For
  1065.                  example, on a 640x480 VGA display, six 200x200 images can
  1066.                  be displayed adjacent to each other.
  1067.  
  1068.    SUBsample n   used in conjunction with the SIZE command, to scale each
  1069.                  image to fit in the SIZE specification.  Same as SUB
  1070.                  option used with the DISPLAY command.
  1071.  
  1072.    NOLabel       inhibits writing the file name label at the top of each
  1073.                  image as it is displayed.  The default is that labels are
  1074.                  enabled.
  1075.  
  1076.    DNLow DNHigh  sets the DN range for all images (see SET).
  1077.  
  1078.    PAUse n       pauses display for n seconds when the screen gets full.
  1079.  
  1080.    ALL           searches all subdirectories in addition to the current
  1081.                  directory, looking for files matching the mask.
  1082.  
  1083.    AUToset n     sets DNLO and DNHI to n% of the full range, based on the
  1084.                  image histogram.  The default is 5%.
  1085.  
  1086.    SELect        interactively selects files as they are being displayed
  1087.                  and writes the filenames out to a "select" file. The
  1088.                  default select file is "C:\IMDISP.SEL" and this can be
  1089.                  changed by using the SET SELECT command.
  1090.  
  1091.    FILe fname    select files to browse from a file instead of using a
  1092.                  mask.  The file will contain a list of files, and the list
  1093.                  can have wildcarded names.  The filename can also be the
  1094.                  IMDISP.SEL file created earlier with the SELect option.
  1095.  
  1096.    BUFFERS       browses through all the memory buffers which have been
  1097.                  created.
  1098.  
  1099.    EXAMPLES:
  1100.  
  1101.        BROWSE *.* SIZE 200 SUBSAMPLE 4
  1102.  
  1103. will display all the files in the current directory, subsampling each by 4
  1104. and displaying them in a 200 x 200 window.  The command:
  1105.  
  1106.        BROWSE *.IBG SIZE 100 SUB 2 PAUSE ALL
  1107.  
  1108. when used with the Voyager browse images will display all of the browse
  1109. images on the screen (including the subdirectories), pausing each time the
  1110. screen fills up with images.
  1111.  
  1112.        BRO *.* SIZE 200 ALL SELECT NOLABEL
  1113.  
  1114. will allow the selection of individual images and
  1115.  
  1116.        BRO FILE C:\IMDISP.SEL SIZE 200
  1117.  
  1118. will redisplay the images that you just selected.
  1119.  
  1120.        BROWSE BUFFERS PAUSE
  1121.  
  1122. displays the contents of each buffer, pausing in between each display.
  1123.  
  1124.        BRO BUFFERS SIZE 100 SUB 4
  1125.  
  1126. displays a small version of each buffer.
  1127.  
  1128. *** NOTE ***
  1129.  
  1130.    BROWSE does not distinguish between image and non-image files, and it is
  1131. up to the user to provide the appropriate directory mask to select ONLY
  1132. images.  If a message "Image does not have proper label" comes up on the
  1133. screen during BROWSE, it is probably because a non-image file is in the
  1134. directory you are browsing.   You can type carriage returns several times
  1135. to get back to the "COMMAND:" prompt, and the browse will continue.
  1136.  
  1137.    If you are using BROWSE on a computer without a hard disk, you will have
  1138. to use the SET BROWSE command to change the default browse file name to a
  1139. writable disk drive,  for example: "SET BROWSE A:BROWSE.CMD". If you are
  1140. using BROWSE to view files on a CD-ROM disk, be sure to include the drive
  1141. letter of a writable disk  drive if you specify a BROWSE file name.  The
  1142. text editor to produce your own custom command files.
  1143.  
  1144.  
  1145. 4.5.4 CD or CHDIR
  1146.  
  1147.  
  1148.    The CD or CHDIR command is used just as it is at the MS-DOS command
  1149. level to change the current default directory.
  1150.  
  1151.    The  argument  of the CD command is the  path  name specification of the
  1152. new default directory.  For example, "CD \IMDISP\IMAGES" would make
  1153. \IMDISP\IMAGES the current directory if it exists.  To change the current
  1154. default drive use the "SYSTEM" command ("SYSTEM L:"  for example) or the
  1155. "FILE" command.  If there is not enough memory available for the system
  1156. command to be executed an error message is displayed.
  1157.  
  1158.  
  1159. 4.5.5 COPY
  1160.  
  1161. The COPY command will attempt to copy the image last displayed with the
  1162. DISPLAY command, the screen or another buffer to a destination buffer.
  1163. IMDISP will attempt to put the buffer into extended memory.  An FILE option
  1164. is provided to allow the buffer to be put into a file on the disk.
  1165.  
  1166.         COPY  buffer [FILe]
  1167.         COPY  TO buffer [FILe]
  1168.         COPY  source TO buffer [FILe]
  1169.  
  1170.       where buffer = A-Z
  1171.       where source = A-Z or SCReen
  1172.  
  1173. Examples:
  1174.  
  1175. COPY A                Copies the last displayed image to buffer A
  1176. COPY A TO B           Copies buffer A to buffer B
  1177. COPY A TO B FILE      Copies buffer A to buffer B, buffer B is a file
  1178. COPY SCREEN TO Z      Copies the entire screen to buffer Z
  1179.  
  1180.  
  1181. 4.5.6 CURSOR
  1182.  
  1183.  
  1184.    The CURSOR command is used to select a point in a displayed image for
  1185. subsequent display commands.  When first invoked, it places a small cursor
  1186. symbol at the center of the screen.  Depending on the current contents of
  1187. the screen, the cursor may be hard to see.  Moving it with the arrow keys
  1188. on the numeric keypad will help you locate it.  If you have a mouse, it
  1189. will also move the cursor around.
  1190.  
  1191.    Whenever the cursor is moved, the current line and sample location of
  1192. the cursor and the DN value of the pixel at that point is printed in the
  1193. lower right portion of the screen.  The cursor will move 16 pixels in the
  1194. selected direction unless the movement value is adjusted using the + or
  1195. keys.
  1196.  
  1197.                           Numeric Keypad Keys
  1198.                     ┌──────┬──────┬───────┬───────┐
  1199.                     │  7   │  8   │  9    │ PrtSc │
  1200.                     │ Home │ Up   │ PgUp  │       │
  1201.                     ├──────┼──────┼───────┼───────┤
  1202.                     │  4   │  5   │  6    │  -    │
  1203.                     │ Left │      │ Right │       │
  1204.                     ├──────┼──────┼───────┼───────┤
  1205.                     │  1   │  2   │  3    │  +    │
  1206.                     │ End  │ Down │ PgDn  │       │
  1207.                     └──────┴──────┴───────┴───────┘
  1208.  
  1209.                          Action of Keypad Keys:
  1210.  
  1211.                   7 = Move up and left.
  1212.                   8 = Move up.
  1213.                   9 = Move up and right.
  1214.                   4 = Move left.
  1215.                   5 = Not active.
  1216.                   6 = Move right.
  1217.                   1 = Move down and left.
  1218.                   2 = Move down.
  1219.                   3 = Move down and right.
  1220.                   - = Decrement cursor movement value.
  1221.                   + = Increment cursor movement value.
  1222.  
  1223.  
  1224.                      Table 4-2: IMDISP Cursor Keys
  1225.  
  1226.    Cursor mode is exited by typing a "." (period) or carriage return or by
  1227. tapping the left button on the mouse.  The cursor position is retained for
  1228. future use in DISPLAY commands which use the CENTER option.  It is very
  1229. useful with large images where the entire image may be displayed using the
  1230. subsample option, then a point selected for subsequent display at full
  1231. resolution.
  1232.  
  1233.    You can specify the starting position of the cursor with the subcommands
  1234. DSL (Display Starting Line) and DSS (Display Starting Sample).  Otherwise,
  1235. the cursor starts off at the position where it was left last.
  1236.  
  1237.    Example: Type "FILE MONTAGE.IMG" followed by "DISP" to display the
  1238. MONTAGE.IMG file.  Type "CUR" to enter the cursor mode, then move the
  1239. cursor to the center of the Uranus image in the upper left corner of the
  1240. image using the up and left arrow keys.  Now type "." to exit cursor mode,
  1241. then type "DISP ZOOM 4 CENTER" which will display Uranus as a large grainy
  1242. ball on the screen.
  1243.  
  1244.  
  1245. 4.5.7 DARKEN
  1246.  
  1247.    The DARKEN command subtracts a constant value from all pixels in the
  1248. displayed image.  If no value is specified, the default is 10% of the total
  1249. range of DN values (i.e., 2 will be subtracted from all pixels in 16-color
  1250. modes, 26 will be subtracted in 256 color modes).
  1251.  
  1252.    Examples:
  1253.  
  1254.    DARKEN
  1255.    DAR 100
  1256.  
  1257.  
  1258. 4.5.8 DIR
  1259.  
  1260.  
  1261.    The DIR command is used just as the MS-DOS dir command.  Its argument is
  1262. passed to MS-DOS for execution.  At the end of the directory listing the
  1263. screen will display "Type carriage return to continue:" which will return
  1264. to the IMDISP command mode.  If there is not enough memory available for
  1265. the system command to be executed an error message is displayed.
  1266.  
  1267.  
  1268. 4.5.9 DISPLAY
  1269.  
  1270.  
  1271.    The DISPLAY command reads an image file and displays it on the the
  1272. screen.  If the image is larger than the display screen, the default mode
  1273. is to display as much of the upper left portion of the image as will fit on
  1274. the screen.  The SUBSAMPLE keyword can be used to select every 'n' lines
  1275. and samples so that representations of very large images may be displayed.
  1276. The ZOOM keyword can be used to enlarge a portion of an image on the
  1277. display screen.  Keywords can be specified to begin displaying at any line
  1278. and sample in the image with the SL (starting line) and SS (starting
  1279. sample).  If only a limited number of lines and samples are to be displayed
  1280. the NL (number of lines) and NS (number of samples) keywords can be used.
  1281. The UP, DOWN, LEFT and RIGHT keywords can be used to display different
  1282. portions of the image, relative to the currently displayed portion.  The
  1283. display can also placed at any point on the screen using the DSL (display
  1284. starting line) and DSS (display starting sample) keywords.  The FLIP
  1285. keyword displays the image from the bottom of the screen to the top, rather
  1286. than the other way around.
  1287.  
  1288.    DISPLAY takes the following keywords :
  1289.  
  1290.    buffer       displays the image in the named memory buffer
  1291.  
  1292.    SUBsample n  a positive integral subsampling factor for displaying
  1293.                 images larger than the size of the screen.  SUB=2 would
  1294.                 display an image at half the resolution.
  1295.  
  1296.    If the image lines and samples look like this:
  1297.  
  1298.                  sample values
  1299.  
  1300.         line 1      1 2 3 4 5
  1301.         line 2      6 7 8 9 10
  1302.         line 3      11 12 13 14 15
  1303.  
  1304.    Then the command DISP SUB 2 would produce:
  1305.  
  1306.                  sample values
  1307.  
  1308.         line 1      1 3 5
  1309.         line 2      11 13 15
  1310.  
  1311.    ZOOM n       a positive integral zoom factor for looking at part of an
  1312.                 image close up.  The zoom command replicates pixels by the
  1313.                 integer value specified.  If the image lines and samples
  1314.                 look like this:
  1315.  
  1316.                  sample values
  1317.  
  1318.         line 1      1 2 3
  1319.         line 2      4 5 6
  1320.         line 3      7 8 9
  1321.  
  1322.    Then the command ZOOM 2 would produce the following:
  1323.  
  1324.                  sample values
  1325.  
  1326.         line 1      1 1 2 2 3 3
  1327.         line 2      1 1 2 2 3 3
  1328.         line 3      4 4 5 5 6 6
  1329.         line 4      4 4 5 5 6 6
  1330.         line 5      7 7 8 8 9 9
  1331.         line 6      7 7 8 8 9 9
  1332.  
  1333.  
  1334.    CENTER       center the display around current cursor position.   This
  1335.                 command is very useful when displaying large images or when
  1336.                 zooming in on selected areas.  Should be used after using
  1337.                 the CURSOR command.
  1338.  
  1339.    NL n
  1340.    NS n         number of lines or samples from the image file to display
  1341.  
  1342.    SL n
  1343.    SS n         starting line or sample within the image file to display
  1344.  
  1345.    UP n
  1346.    DOWN n       adjusts the starting line up or down from the previous
  1347.                 value, thereby moving  the display window up or down in the
  1348.                 image. The default amount to move up or down is the size of
  1349.                 the display.
  1350.  
  1351.    LEFT n
  1352.    RIGHT n      adjusts the starting sample left or right from the previous
  1353.                 value, thereby moving the display window left or right in
  1354.                 the image
  1355.  
  1356.    DSL n
  1357.    DSS n        start the image display at the specified line and sample on
  1358.                 the display screen.
  1359.  
  1360.    FLIP         flips the image top to bottom, so the image is displayed
  1361.                 from the bottom of the screen to the top.
  1362.  
  1363.    NOPrompt     displays the image without display the command line prompt
  1364.                 (COMMAND:) at the bottom of the screen.  This is to
  1365.                 accommodate screen captures of IMDISP displays.
  1366.  
  1367.    AUToset n    sets DNLO and DNHI to n% of the full range, based on the
  1368.                 histogram.  The default is 5%.
  1369.  
  1370.    NOMemory     tells IMDISP not to attempt to load the image into extended
  1371.                 memory as it displays the image.
  1372.  
  1373.    SOUrce       used to display the source file of a browse image.  The
  1374.                 source file is specified with the SOURCE_FILE_NAME and
  1375.                 SAMPLING_FACTOR keywords in the label.  The source file is
  1376.                 centered on the current cursor position in the browse file.
  1377.                 Does not work with Voyager or Viking compressed images.
  1378.  
  1379.    Examples: The user wants to display an entire Voyager image (800 x 800)
  1380. on the display screen then display a portion of the image at full
  1381. resolution.  Type "FILE MIRANDA1.LBL", then "DISP SUB 2" to display the
  1382. entire image at half resolution, Use the CURSOR command to move the cursor
  1383. to the center of an area of interest.  Exit the cursor mode by typing ".",
  1384. then type "DISP CENT" to display the selected portion of the image at full
  1385. resolution.
  1386.  
  1387.    The user wishes to place 2 images which are each 800 lines by 800
  1388. samples on the screen next to each other.  The first file is opened with
  1389. "FILE IMAGE1.IMG".  The "DISPLAY SUB 4" command is given to display every
  1390. 4th line and sample of the image to create a 200 x 200 display. Next the
  1391. "FILE IMAGE2.IMG" command is given.  Now a "DISPLAY SUB 4 DSS 201" is given
  1392. to place the second image on the screen starting at display sample position
  1393. 201, next to the first image.
  1394.  
  1395.  
  1396.     Examples:
  1397.  
  1398.     DISP SUB 2
  1399.     DISP SUB 3 DSS 200
  1400.     DISP SUB 4 DSL 300
  1401.     DISP CEN ZOOM 2              (Use CUR first to select a center)
  1402.     DISP A                       Displays buffer A
  1403.     DISP A SUB 2                 Displays buffer A, subsampled twice
  1404.     DISP A CEN ZOOM 3            Zooms in on the center of buffer A
  1405.  
  1406.  
  1407. 4.5.10 ENHANCE
  1408.  
  1409.  
  1410.    The command ENHANCE applies a number of image processing filters to the
  1411. image.  It can either be applied to the entire image (from the input file)
  1412. or simply to the displayed portion of the image.
  1413.  
  1414.    ENHANCE takes the following subcommands:
  1415.  
  1416.      SCReen         applies the filter to the entire screen.  If this
  1417.                     option is not selected, then the filter will be applied
  1418.                     to the image last displayed with the DISPLAY command.
  1419.  
  1420.      BAAlke         applies an enhancement filter developed by Ron Baalke.
  1421.  
  1422.      CONvolution n  applies a convolution filter to the image which has the
  1423.                     effect of detecting the edges.  A 3x3 mask is used.
  1424.                     There are two variations of this filter used (n = 0 or
  1425.                     1). Integer arithmetic is used to speed up the process.
  1426.                     The following weighted mask is used:
  1427.  
  1428.                                -1  -1  -1
  1429.                                -1   8  -1
  1430.                                -1  -1  -1
  1431.  
  1432.      EDGe n         applies an edge enhancement filter to the image using a
  1433.                     3x3 mask.  There are four variations of this filter (n
  1434.                     = 0, 1, 2, 3). Integer arithmetic is used to speed up
  1435.                     the process.
  1436.  
  1437.      HIGh n         applies a high pass filter to the image, which has the
  1438.                     effect of removing slowly varying changes in the image,
  1439.                     and leaving behind rapid changes.
  1440.  
  1441.      HIStogram      applies a histogram equalization filter to the image,
  1442.                     which has the effect of maximizing the contrast across
  1443.                     the whole image.
  1444.  
  1445.      LOG  n         applies a logarithmic filter to the image which has the
  1446.                     effect of enhancing the contrast in the image. Useful
  1447.                     on dark images or on images like stars and galaxies.
  1448.                     The parameter that goes with this one is a little
  1449.                     different than the other filters, in that you specify a
  1450.                     factor (default=40) which is multiplied with the log of
  1451.                     the pixel value. Examples:
  1452.  
  1453.      MEAn n         applies a mean filter to the image which has the effect
  1454.                     of smoothing out the image.  There are three variations
  1455.                     of this filter (n = 0, 1).  A 3x3 (n=0), 5x5 (n=1) or
  1456.                     7x7 (n=2) mask is used where the middle pixel is
  1457.                     replaced by the average of the nine pixels in the mask.
  1458.                     Integer arithmetic is used to speed up the process.
  1459.  
  1460.      MEDian         applies a median filter to the image which has the
  1461.                     effect of smoothing out the image.  A 3x3 mask is used
  1462.                     where the middle pixel is replaced by the middle of the
  1463.                     nine pixels after they have been sorted. The sort used
  1464.                     is a simple bubble sort which is terminated halfway
  1465.                     through the sort process since the median value will be
  1466.                     found by then.
  1467.  
  1468.      POWer n        modifies the pixels of the image by the following
  1469.                     equation:
  1470.  
  1471.                        newDN = numDN * (oldDN/numDN) ^ n
  1472.  
  1473.                     where n is a floating point number.  The default value
  1474.                     is 2.0.  Values less than 1.0 tend to brighten the
  1475.                     image, while values greater than 1.0 tend to darken it.
  1476.  
  1477.      STAir n        groups pixels together with the net result of smoothing
  1478.                     the image.  The default step increment is 8
  1479.  
  1480.      SMEar          applies a filter which averages the image in the
  1481.                     vertical direction.  The result is to "smear" the
  1482.                     images down the screen.
  1483.  
  1484.      UNSharp        applies an unsharp mask to the image, which has the
  1485.                     effect of enhancing edges in the image. It is the
  1486.                     equivalent of performing a merge with 3 times the
  1487.                     original image minus 2 times the image after it has
  1488.                     been blurred with a 5x5 mean filter.
  1489.  
  1490.  
  1491.      Examples:
  1492.  
  1493.         ENH MEAN
  1494.         ENH EDGE
  1495.         ENHANCE EDGE 2
  1496.         ENHANCE BAALKE SCREEN
  1497.         ENH CON 1
  1498.         ENH SMEAR SCR
  1499.         ENH POWER .1   (similar to ENH LOG)
  1500.         ENH STAIR 2    (creates a binary 2-color image)
  1501.  
  1502.  
  1503. 4.5.11 ERASE
  1504.  
  1505.  
  1506.    The command ERASE causes the screen to be erased by setting all of the
  1507. pixels to 0, which may not necessarily be black depending on the palette
  1508. setting.  If the REFRESH option is selected, then only the refresh buffer
  1509. will be erased.  Memory buffers (denoted by letters A through Z) can also
  1510. be erased.
  1511.  
  1512.     Examples:
  1513.  
  1514.        ERA            erases the screen
  1515.        ERA REFRESH    erases the refresh buffer
  1516.        ERA A          erases the memory buffer named A
  1517.  
  1518.  
  1519. 4.5.12 EXIT
  1520.  
  1521.  
  1522.    The EXIT command exits IMDISP and returns the user to the MS-DOS
  1523. operating system.  The contents of the image display and refresh buffer are
  1524. discarded.   The single subcommand NOClear will leave the computer display
  1525. in graphics mode, and will not clear the screen.  Same as QUIT.
  1526.  
  1527.  
  1528. 4.5.13 FILE
  1529.  
  1530.  
  1531.    FILE takes just a value which is the file name. The specified file will
  1532. be opened, or an error message issued if the file cannot be opened.  The
  1533. capability to directly address any sector on the CD-ROM disk by providing
  1534. its physical address (minute, second and sector number) is also available
  1535. to users of the Microsoft Extensions software.  There is one keyword,
  1536. NOMEMORY.  If not given, the FILE command will attempt to put the image
  1537. directly into extended memory (where the DISPLAY command will find it).  If
  1538. specified, or if the image doesn't fit into extended memory, the DISPLAY
  1539. command will read the image from disk.  FILE can now display GIF-format
  1540. images, as well.  It does this automatically if the filename extension is
  1541. .GIF.
  1542.  
  1543.    If the FILE command is specified without a filename, or with a filename
  1544. mask which contains a wildcard, the program will display a list of file
  1545. names in the current directory.  Each file name is preceded by a number.
  1546. Typing the number associated with a file name will select that file for
  1547. processing.  File names that actually represent lower level directories are
  1548. indicated with a <d> symbol after the name, Directories can be traversed
  1549. downward by selecting the number associated with a directory name.  Upward
  1550. traversal is by selecting the item identified as PARENT DIR.  This will
  1551. move upward in the directory hierarchy.
  1552.  
  1553.    The prompt mode clears the screen and displays a menu of files (matching
  1554. the wildcard mask, if one was used) and commands.  These commands allows
  1555. specification of the default drive, a file "mask" to use in selecting file
  1556. names for display and options for moving through the list of files when the
  1557. current directory contain more than 30 files. The top line of the display
  1558. also indicates how many files are in the current directory.  After exiting
  1559. the FILE prompt mode, the previous contents of the display screen can be
  1560. recovered by typing "REFRESH".
  1561.  
  1562.    The FILE prompt mode subcommands:
  1563.  
  1564.      D    select default disk drive
  1565.      M    specify a file selection mask to use in displaying files on the
  1566.           screen.
  1567.      N    display the next set of file names on the screen if there are
  1568.           more files in the current directory than can be displayed on one
  1569.           screen.
  1570.      P    display the previous set of file names.
  1571.      Q    quit the file selection mode and return to IMDISP command mode.
  1572.  
  1573.    The N, P and Q commands are executed immediately.  If the D or M
  1574. commands are selected, the user is prompted to enter a drive letter or file
  1575. mask.
  1576.  
  1577.    If the file selected by the "FILE filename" or FILE prompt mode has a
  1578. valid label, either PDS or VICAR2, then the number of lines and samples and
  1579. the pixel size will be displayed.  If the file is unlabeled then the
  1580. program will prompt for the values to use for the number of lines and
  1581. samples, the number of bits per pixel, and the number of header bytes. PDS
  1582. detached labeled images can also be displayed.  The specified file remains
  1583. the current file until a new FILE command is given.  The FILE command
  1584. resets the SET DNLO and SET DNHI values to the minimum and maximum for the
  1585. pixel size (normally 0 and 255).  If a specified filename is not found in
  1586. the current directory then an error message is displayed.
  1587.  
  1588.    If the unlabeled image has a regular format, that is a uniform structure
  1589. of repeating lines and samples, the user can specify this information when
  1590. prompted by the program.  For example, an image named ASTERIA.DAT with one
  1591. 1422 byte header block followed by an image composed of 370 lines by 450
  1592. samples of 8 bit pixels would be processed as follows:
  1593.  
  1594.    At the COMMAND: prompt type "FILE ASTERIA.DAT".  The program will
  1595. display the message:
  1596.  
  1597.   Input file does not have a proper label.
  1598.   Input number of lines: 370           enter the value 370
  1599.   Input number of samples: 450         enter the value 450
  1600.   Input size of each sample: 8         enter the value 8
  1601.   Input size of header label: 1422     enter 1422 for the size of the
  1602.                                        foreign label block).
  1603.  
  1604.    The physical address of a data block on the CD-ROM can also be specified
  1605. using the syntax 'FILE "CD:mm:ss:bb"', where mm is the minute, ss the
  1606. second, and bb the sector block number of the beginning of the desired data
  1607. area.  The CD:mm:ss:nn must be in double quotes and the CD must be
  1608. capitalized! This mechanism can be used to access files on non-High Sierra
  1609. format disks.  This will only work on systems using the Microsoft
  1610. Extensions software.
  1611.  
  1612.  
  1613. 4.5.14 HELP
  1614.  
  1615.  
  1616.    HELP displays the online help message.  If followed by the name of a
  1617. valid command the message for that command is displayed.  HELP is not
  1618. provided for MS-DOS commands (DIR, CHDIR, CD and TYPE).
  1619.  
  1620.  
  1621. 4.5.15 HISTOGRAM
  1622.  
  1623.  
  1624.    The HISTOGRAM command produces a plot showing the number of pixel values
  1625. in the image at each DN level.  The range of DN values is displayed on the
  1626. x-axis and the number of occurrences of a specific DN value on the y-axis
  1627. (See Figure 4-1).
  1628.  
  1629.    The HISTOGRAM command reads through the image, calculates the histogram,
  1630. and then displays the plot on the screen.  The histogram is scaled so that
  1631. the third highest histogram value is used as the maximum. It is recommended
  1632. that the SUBSAMPLE or other subsetting keywords be used to speed up
  1633. histogram calculation, which can be quite slow for large images and for
  1634. images stored on CD-ROM.  Histogram plots are displayed on top of any image
  1635. currently displayed on the screen, so the user may wish to use the ERASE
  1636. command to clear the screen prior to using HISTO.  After the histogram is
  1637. displayed, the image can be restored using the REFRESH command.
  1638.  
  1639.  
  1640.             27582 |      .
  1641.                   |      ..
  1642.                   |     ....
  1643.            COUNT  |     .....
  1644.                   |    .......
  1645.                   |    .........
  1646.                   |   ............
  1647.                   |  ...............
  1648.                    --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1649.                    0   64   128   192   256
  1650.                             DN value
  1651.  
  1652.                    Figure 4-1: Sample Image Histogram
  1653.  
  1654.  
  1655.    By evaluating the histogram, the user can determine the optimum settings
  1656. for the SET (DNLO and DNHI) command to produce a useful display.  In the
  1657. example above, the image data are clustered between DN values 32 and 144.
  1658. Using the default settings of the EGA display mode the colors assigned to
  1659. the 2 lowest color values and the 7 highest values (representing DN values
  1660. from 0 to 31 and from 144 to 255) would not be used since the image
  1661. contains no pixels with these values.
  1662.  
  1663.    By using the "SET DNLO 32 DNHI 144" command the 16 display levels
  1664. available on the EGA display would be assigned to values between 32 and 144
  1665. rather than distributed evenly from 0 to 255, and all 16 colors would be
  1666. used in the display.
  1667.  
  1668.    HISTOGRAM takes the following keywords and arguments:
  1669.  
  1670.     SUBsample n  a integral subsample factor.  For speeding up HISTOGRAM,
  1671.                  use of "SUBSAMPLE 4" is recommended
  1672.  
  1673.     buffer       displays the histogram of the image in the named memory
  1674.                  buffer
  1675.  
  1676.     NL n
  1677.     NS n         number of lines and samples from image
  1678.  
  1679.     SL n
  1680.     SS n         starting line and sample in image
  1681.  
  1682.     CENT         perform the histogram on only the displayed portion of the
  1683.                  image.
  1684.  
  1685.    Two special keywords can be used with Voyager or Viking images on the
  1686. PDS CD-ROM disks.  These will extract histogram values stored with the
  1687. image on the CD-ROM disk and reduce the time required for the histogram to
  1688. be generated from more than 1 minute to about 3 seconds.  Note that these
  1689. commands will not work with Voyager image files in the
  1690. \PLANET\JUPITER\ATMOS directory, or with versions of system software
  1691. written before April 1987.
  1692.  
  1693.     VOY   use histogram from Voyager CD-ROM engineering data
  1694.     VIK   use histogram from Viking CD-ROM engineering data
  1695.  
  1696.  
  1697. 4.5.16 LABEL
  1698.  
  1699.  
  1700.    The LABEL command prints the labels for the currently selected image
  1701. file on the screen.   It pauses after each screen full of data, and waits
  1702. for you to press a key before displaying the next screen of data. You can
  1703. terminate the listing by pressing the letter 'Q' to quit and return to
  1704. IMDISP.
  1705.  
  1706.  
  1707. 4.5.17 LOG
  1708.  
  1709.  
  1710.    The LOG command controls logging commands to a text file as they're
  1711. entered.  The resulting file can be used as a batch file, to repeat the
  1712. command sequence, or as a record of what operations have been performed.
  1713. The file is automatically flushed and closed when you exit IMDISP.
  1714.  
  1715.    The LOG command takes the following keywords and arguments:
  1716.  
  1717.     ON             opens a log file called IMDISP.LOG.  Commands will be
  1718.                    copied into this file until it is either closed or you
  1719.                    exit IMDISP.
  1720.  
  1721.     FILe  fname    opens a log file called fname (defaults to IMDISP.LOG).
  1722.  
  1723.     CLOse
  1724.     OFF            closes the current log file.
  1725.  
  1726. 4.5.18 MASK
  1727.  
  1728.    The MASK command is used to mask out pixels on the low or high end of
  1729. the color palette.  It is particularly userful when merging images
  1730. together.  It sets all the pixels with a DN value above or below a
  1731. specified value to a default.
  1732.  
  1733.    The MASK command takes the following keywords and arguments:
  1734.  
  1735.     LO n           sets all pixels with a DN value of n or less to the
  1736.                    default DN value of 0.
  1737.  
  1738.     HI n           sets all pixels with a DN value of n or greater to the
  1739.                    default DN value of 255.
  1740.  
  1741.     WITH n         overrides the default values for LO and HI, and sets the
  1742.                    pixels to the DN value n.
  1743.  
  1744. Examples:
  1745.  
  1746. MASK LO 20             Sets the DN values for all pixels with DN values of
  1747.                        20 or less to 0.
  1748.  
  1749. MASK LO 20 WITH 255    Sets the DN values for all pixels with DN values of
  1750.                        20 or less to 255.
  1751.  
  1752. MASK HI 200            Sets the DN values for all pixels with DN values of
  1753.                        200 or more to 255.
  1754.  
  1755. MASK HI 200 WITH 0     Sets the DN values for all pixels with DN values of
  1756.                        200 or more to 0.
  1757.  
  1758.  
  1759. 4.5.19 MENU
  1760.  
  1761.  
  1762.    The MENU command reads a file containing a list of file names and places
  1763. the user in the MENU mode, where files from this list can be selected for
  1764. display.  The MENU mode is similar to the FILE mode, except that the list
  1765. of files presented is that provided in the menu file, rather than from a
  1766. selected directory.
  1767.  
  1768.    The MENU mode can be invoked by typing "MENU filename.MNU" at the
  1769. COMMAND: prompt.  It can also be invoked on program startup by typing
  1770. "IMDISP filename.MNU" to initiate the program.  The menu file must use the
  1771. ".MNU" extension to startup IMDISP in MENU mode.
  1772.  
  1773.    Subcommands of the MENU mode are as follows:
  1774.  
  1775.    #         - Enter the number corresponding to a desired
  1776.                file name to select the file.
  1777.  
  1778.    P)revious - display the previous screen of file names
  1779.    N)ext     - display the next screen of file names
  1780.    Q)uit     - quit or exit from MENU mode
  1781.  
  1782.    After selecting and displaying an image, the user can return to the
  1783. current menu by typing "MENU" at the COMMAND: prompt.
  1784.  
  1785.    A menu file can take either of two formats.   The preferred format is a
  1786. PDS labelled table file containing file names.  A sample file is shown
  1787. below:
  1788.  
  1789. NJPL1I00PDS100000000      = SFDU_LABEL
  1790. FILE_TYPE                 = TABLE
  1791. RECORD_FORMAT             = STREAM
  1792. OBJECT                    = FILE_NAME
  1793.  TYPE                     = LITERAL
  1794.  LENGTH                   = 80
  1795. ENDOBJECT
  1796. NOTE                      = "Sample MENU file for IMDISP"
  1797. END
  1798. L:\OCEAN\SCBMEAN.IMG
  1799. L:\OCEAN\WCMEAN.IMG
  1800. L:\PLDS\TMCH01.DAT
  1801. L:\PLDS\DEM.DAT
  1802. L:\PLANET\SATURN\ATMOS\C3497355.IMG
  1803. <END OF FILE>
  1804.  
  1805.    A second abbreviated form may also be used, where only the filenames are
  1806. specified in the ".MNU" file.  In this case the file would only contain the
  1807. filenames shown after the END statement in the example above.
  1808.  
  1809.  
  1810. 4.5.20 MERGE
  1811.  
  1812.  
  1813. The MERGE command will merge buffers, images or the screen together.  A
  1814. scaling option can be provided to control the amount of merging.  If the TO
  1815. option is not used then the result will be displayed on the screen by
  1816. default.  The result can also be written to a buffer.
  1817.  
  1818.         MERGE buffer
  1819.         MERGE source1 [scale1] WITH source2 [scale2] [TO buffer] [FILE]
  1820.  
  1821. Examples:
  1822.  
  1823. MERGE A                   Merge the last displayed image with buffer A and
  1824.                           display the result back on the screen
  1825.  
  1826. MERGE A WITH B            Merge buffer A with buffer B and display the
  1827.                           result on the screen.  Since no scaling parameter
  1828.                           are specified IMDISP will default to 50% of A and
  1829.                           50% of B.
  1830.  
  1831. MERGE A WITH B TO C       Merge buffer A with buffer B and store the result
  1832.                           into buffer C
  1833.  
  1834. MERGE A WITH B -1         Subtract buffer A from buffer B
  1835.  
  1836. MERGE A .75               Merge 25% of the last displayed image with 75% of
  1837.                           buffer A, display the result on the screen.
  1838.  
  1839. MERGE A .75 with B .8     Merge 75% of buffer B with 80% of buffer B,
  1840.                           display result on the screen
  1841.  
  1842. MERGE B WITH SCREEN       Merge buffer B with the screen
  1843.  
  1844. MERGE A 3 WITH B -2 TO C FILE    Subtract twice buffer B from 3 times A,
  1845.                                  store the result in buffer.
  1846.  
  1847.  
  1848. 4.5.21 OVERLAY
  1849.  
  1850.  
  1851.    The OVERLAY command draws a lat/lon overlay grid on the displayed image.
  1852. It is intended only for use with the Ocean Data System, West Coast Time
  1853. Series CD-ROM in this program version.
  1854.  
  1855.    The OVERLAY command has the following arguments:
  1856.  
  1857.    MAXLAT   Latitude of top of image.
  1858.    MINLAT   Latitude of bottom of image.
  1859.    MAXLON   Longitude of left side of image.
  1860.    MINLON   Longitude of right side of image.
  1861.  
  1862.    LEGend   Draw a color scale with the overlay.
  1863.  
  1864.  
  1865. 4.5.22 PALETTE
  1866.  
  1867.  
  1868.    The PALETTE command is used for changing the colors assigned to
  1869. displayable color values.  This is done by modifying an internal color
  1870. table which assigns intensity values for red, green and blue to a color
  1871. value, The EGA provides 4 intensity values for each of 3 colors, so that 64
  1872. different colors can be created.  However, the EGA pixels are only 4-bits
  1873. each so only 16 color values can be used simultaneously.
  1874.  
  1875.    The palette can be modified using the EDIT command and saved and loaded
  1876. from a disk file.  The edit mode is invoked by typing PALETTE EDIT.  With
  1877. the EGA display, a bar containing 16 colors or shades will be displayed on
  1878. the bottom of the screen.  A small square will appear in the middle of the
  1879. center color box.  This indicates that this color value is currently
  1880. selected for editing.  To select another color value for editing, move the
  1881. small square to the appropriate color using either the "4" (left arrow) and
  1882. "6" (right arrow) keys on the numeric keypad or the mouse.  The "7" (Home)
  1883. and "1" (End) keys move to the beginning and end of the palette. Pressing
  1884. the "Ctrl" key with either the "4" or "6" keys will jump the small square
  1885. left or right by 8 color bars.
  1886.  
  1887.    The color of the current color box is changed with the "R", "G", and "B"
  1888. keys (for red, green, and blue).  Upper case letters increase the amount of
  1889. the primary color, and lower case keys decrease the amount of the color.
  1890. The "8" (up arrow) and "2" (down arrow) keys increase and decrease,
  1891. respectively, the amount of red, green, and blue simultaneously.  The left
  1892. button on the mouse does the same thing.  Other commands in the palette
  1893. edit mode are the "S" and "s" commands, which will shift all colors one
  1894. value to the right or left, and the "x" command, which will exchange color
  1895. values (the color setting for color 0 becomes the setting for color 15,
  1896. while 15 replaces 0, the color setting for color 1 becomes the setting for
  1897. 14, while 14 replaces 1, etc.).  The up and down arrow keys can also be
  1898. used to cycle through the colors available in a given display mode one at a
  1899. time. Type the "." key or carriage return to exit the edit mode.
  1900.  
  1901.    PALETTE takes the following keywords and arguments:
  1902.  
  1903.     EDIT n         to interactively adjust an n-color palette.  See edit
  1904.                    description (above) for details
  1905.  
  1906.     PSEUDOCOLOR n  PS = 0 for default EGA palette,
  1907.                    PS = 1 for gray scale palette,
  1908.                    PS = 2 or 3 for pseudo color palettes (16 levels)
  1909.                    PS = 4, ..., 9 for pseudo color palettes (256 levels)
  1910.  
  1911.     SAVE filename  saves the specified palette on disk
  1912.  
  1913.     LOAD filename  loads the specified palette from disk, if no filename is
  1914.                    specified, then list of files is displayed.  See FIL
  1915.                    command for more details.
  1916.  
  1917.     DIS            displays the current palette on the screen
  1918.  
  1919.     ERA            erases the current palette from the screen
  1920.  
  1921.     CYC  n         cycles the color palette
  1922.  
  1923.                    CYC = 0  "blinks" the palette
  1924.                    CYC = 1  blinks four times
  1925.                    CYC = 2  rotates the palette for spectacular results
  1926.                    CYC = 3  rotates and feeds in random colors
  1927.                    CYC = 4  randomizes the palette
  1928.                    CYC = 5  double rotates the palette
  1929.                    CYC = 6  random swaps of the palette
  1930.  
  1931.                    Any key will stop the palette cycling.  A 'S' or 's' key
  1932.                    will save the palette which is currently being
  1933.                    displayed, any other key will restore the palette to its
  1934.                    original colors.
  1935.  
  1936.                    CYCLE itself has two keywords.
  1937.  
  1938.                    FASt     sets the delay between changes to .1 second
  1939.                             (the default is .3).  Works best on machines
  1940.                             with fast video, where flicker is minimized.
  1941.  
  1942.                    TIMe n   runs the PAL CYCLE command for n seconds
  1943.                             (useful in batch files).
  1944.  
  1945.  
  1946.    The default palette file for LOAD or SAVE operations is IMDISP.PAL. The
  1947. format of the default color palette when stored in a palette file is as
  1948. shown below:
  1949.  
  1950. NJPL1I00PDS000000784     = PDS_SFDU_LABEL
  1951. FILE_TYPE                = TABLE
  1952. RECORD_TYPE              = STREAM
  1953. FILE_RECORDS             = 28
  1954. TABLE_ROWS               = 16
  1955. ROW_COLUMNS              =  4
  1956. COLUMN_NAME              = (COLOR_NUMBER,                                          RED_VALUE,
  1957.                             GREEN_VALUE,
  1958.                             BLUE_VALUE)
  1959. COLUMN_TYPE              = (INTEGER,INTEGER,INTEGER,INTEGER)
  1960. END
  1961.   0   0   0   0
  1962.   1  64   0   0
  1963.   2 128   0   0
  1964.   3 192   0   0
  1965.   4 192  64   0
  1966.   5 192 128   0
  1967.   6 192 192   0
  1968.   7 128 192   0
  1969.   8   0 192   0
  1970.   9   0 192 128
  1971.  10   0 128 128
  1972.  11   0 128 192
  1973.  12   0   0 192
  1974.  13 128   0 192
  1975.  14 192   0 192
  1976.  15 192 192 192
  1977.  
  1978.    The first column of the palette table is the color value number for the
  1979. display, and columns 2, 3 and 4 represent the intensity of the red, green
  1980. and blue (respectively) primary colors on a scale of 0 to 255. With the EGA
  1981. display these values are: 0 = off; 64 = low; 128 = medium; 192 = high.
  1982.  
  1983.  
  1984.    Examples:
  1985.  
  1986.       PAL PS 1          (Gray scale palette)
  1987.       PAL PS 7          (Built in color palette #7)
  1988.       PAL DIS
  1989.       PAL EDI
  1990.       PAL CYC 2
  1991.       PAL CYC 4
  1992.  
  1993.  
  1994. 4.5.23 PERSPECTIVE
  1995.  
  1996.    PERSPECTIVE displays the current image as a pseudo-perspective plot.
  1997. This is useful for inspecting the topography of an image - brighter areas
  1998. will seem to be raised higher than dark areas.
  1999.  
  2000.    The PERSPECTIVE command has these arguments:
  2001.  
  2002.    SL  n   displays the plot starting at line n of the image
  2003.  
  2004.    SCR     reads the image from the screen, rather than from disk (slightly
  2005.            faster).
  2006.  
  2007.  
  2008. 4.5.24 PROFILE
  2009.  
  2010.  
  2011.    PROFILE plots the DN values of pixels located along a line between two
  2012. points in the image, i.e., it creates a graph of DN value versus pixel
  2013. along the line joining the two points, CURsor mode is used to select the
  2014. two endpoints; typing "." or carriage return, or tapping the left mouse
  2015. button, selects the current cursor position as the endpoint.  After the
  2016. endpoints are selected a line is drawn between the points and the graph is
  2017. plotted at the bottom of the screen, showing the DN values on the x-axis
  2018. and the positions along the line on the y-axis.
  2019.  
  2020.  
  2021. 4.5.25 QUIT
  2022.  
  2023.  
  2024.    The QUIT command exits IMDISP and returns the user to the MS-DOS
  2025. operating system.  The contents of the image display and refresh buffer are
  2026. discarded.   The single subcommand NOClear will leave the computer display
  2027. in graphics mode, and will not clear the screen.
  2028.  
  2029.  
  2030. 4.5.26 REFRESH
  2031.  
  2032.  
  2033.    REFRESH redisplays the image plane from the refresh buffer.  When images
  2034. are written to the screen they are also written to the refresh buffer.  The
  2035. REFRESH command writes this buffer back to the screen, thereby erasing any
  2036. graphics or text overlaying the image on the screen. The refresh buffer
  2037. contains as many lines from the display screen as there is room for in
  2038. memory.  REFRESH takes no parameters.  It can also be used after the FILE
  2039. prompt mode to redisplay the contents of the refresh buffer.  By default,
  2040. the refresh buffer is allocated from extended (XMS) memory.  If extended
  2041. memory is present, the refresh buffer is on by default.  If there isn't any
  2042. extended memory, or not enough extended memory is available, the refresh
  2043. buffer is off by default, by may be turned on to use a virtual file.  The
  2044. location of the virtual file is given by the environment variable
  2045. IMREFRESH.
  2046.  
  2047.    REFRESH is commonly used after the HELP command, or after a HISTOGRAM or
  2048. PROFILE command to remove text and plots from the display screen.
  2049.  
  2050.    The refresh buffer can be disabled/enabled with the SET command:
  2051.  
  2052.       SET REFRESH ON
  2053.       SET REFRESH OFF
  2054.  
  2055.  
  2056. 4.5.27 ROTATE
  2057.  
  2058.  
  2059.    The ROTATE command rotates the image through a specified angle.  The
  2060. entire image or just the displayed portion can be rotated.  The resulting
  2061. image can be clipped to the dimensions of the screen, if desired, and the
  2062. borders of the image filled.
  2063.                             
  2064.    ROTATE takes the following arguments and keywords:
  2065.  
  2066.    n          the angle to rotate the image through.  Must be between 0 and
  2067.               360 degrees.
  2068.  
  2069.    SCREEN     rotate the entire screen
  2070.  
  2071.    CLIP       trim off the parts of the rotated image outside the display
  2072.  
  2073.    NOFILL     don't blank out the borders of the image
  2074.  
  2075.  
  2076. 4.5.28 SAVE
  2077.  
  2078.  
  2079.    The SAVE command copies the contents of the display screen to a file. On
  2080. EGA systems the display buffer contains only 4-bits per pixel, so
  2081. specifying BP = 8 will write the 4-bit pixels in full bytes, but does not
  2082. save full 8-bit pixels even if the input image is an 8-bit image. Use the
  2083. COPIM utility program to produce a full resolution subset of an 8-bit image
  2084. in that case.  An 8-bit display device can save an image with full 8-bit
  2085. pixels.
  2086.  
  2087.    SAVE takes the following arguments and keywords, where the filename must
  2088. immediately follow the SAVE command:
  2089.  
  2090.     filename    filename of image to save - if the extension on the
  2091.                 filename is .GIF, the file will be saved in GIF format
  2092.                 instead of PDS format.
  2093.  
  2094.     FORMAT xxx  saves the file in the specified format, where "xxx" is GIF,
  2095.                 RAW or PDS.
  2096.  
  2097.     NL n
  2098.     NS n        number of lines and samples to save
  2099.  
  2100.     SL n
  2101.     SS n        starting line and sample to save
  2102.     BP n        number of bits per pixel in output image
  2103.     REFRESH     save the displayed image into the refresh buffer
  2104.  
  2105.    Example: Save a 200 line by 200 sample area from the inner region of an
  2106. image in the file SMALL.IMG.  First use the FILE command to select and
  2107. display an input image.  Now type:
  2108.  
  2109.    "SAVE SMALL.IMG SL 100 SS 210 NL 200 NS 200"
  2110.  
  2111. to save the portion of the image beginning at line 100 and sample 210 in
  2112. the new file SMALL.IMG.
  2113.  
  2114.  
  2115. 4.5.29 SET
  2116.  
  2117.  
  2118.    SET is used set various display options.  It may be used to display and
  2119. change the DN (pixel value) range that is used to compress the pixel values
  2120. to the range appropriate for the display device.  The default, which is
  2121. reset for each new file, is the full range of DN values for the particular
  2122. pixel format (e.g.  0 to 255 for byte).
  2123.  
  2124.    The results of a SET DNLOW or SET DNHIGH command will not take effect
  2125. until the next DISPLAY command is performed.
  2126.  
  2127.    SET can also be used to specify a file name to be used by the browse
  2128. command, change the default display resolution or change the number of
  2129. samples used to display the current image.
  2130.  
  2131.    Set takes the following keywords:
  2132.  
  2133.     DNLOW n
  2134.     DNHIGH n  where values less than DNlow are set to color value 0, values
  2135.               greater than DNHIGH are set to the maximum color value
  2136.               available, and the color values between are assigned equally
  2137.               to the DN values between Dnlow and DNhi.
  2138.  
  2139.     BROwse filename
  2140.               sets a file name to be used for the browse file.   This file
  2141.               name will override  the default file name, which is
  2142.               'c:browse.cmd'.
  2143.  
  2144.     NS n      sets the number of samples to be used for the next DISPLAY
  2145.               command.
  2146.  
  2147.     REFresh ON
  2148.     REFresh OFF
  2149.               toggles the state of the refresh buffer on or off.  If IMDISP
  2150.               detects the presence of extended memory (XMS - managed by a
  2151.               device driver like HIMEM.SYS or QEMM), the refresh buffer
  2152.               will default to ON.  If no XMS is present, the default is
  2153.               off, and turning the refresh buffer on will cause IMDISP to
  2154.               set up a scratch file to be used as the refresh buffer.
  2155.  
  2156.     DELay ON
  2157.     DELay OFF (default)
  2158.               enables/disables the time delay before executing commands.
  2159.               Most useful when used in batch file, because it allows the
  2160.               commands to play slowly instead of as fast as possible.
  2161.  
  2162.     PROmpt ON  (default)
  2163.     PROmpt OFF
  2164.               enables/disables the display of the command names before
  2165.               execution.  Most useful when used in batch files, because it
  2166.               prevents the command prompts from appearing on the screen.
  2167.  
  2168.     DISPLAY name
  2169.               sets the current display device.   You might use this to
  2170.               change from Super VGA resolution to VGA if you wish to have
  2171.               bigger pixels for displaying images with the BROWSE command,
  2172.               for example.  To do this, you would type the command SET DIS
  2173.               VGA.  The change will take place immediately.   The current
  2174.               values for DISPLAY are
  2175.  
  2176.               CGA         (640x200x2)
  2177.               EGA         (640x350x16)
  2178.               EGA480      (640x480x16)
  2179.               VGA320      (320x200x256)
  2180.               VGA         (640x480x16)
  2181.               ATI640      (640x480x256) - ATI VGA Wonder Board (512K)
  2182.               ATI800      (800x600x256) - ATI VGA Wonder Board (512K)
  2183.               ATI1024     (1024x768x16) - ATI VGA Wonder Board (512K)
  2184.               EVGA512     (512x480x256) - Everex EV-673 Board (256K)
  2185.               EVGA640     (640x400x256) - Everex EV-673 Board (256K)
  2186.               ORCHID      (640x480x256) - Orchid ProDesigner+ Board (512K)
  2187.               ORCHID800   (800x600x256) - Orchid ProDesigner+ Board (512K)
  2188.               ORCHID1024 (1024x768x256) - Orchid ProDesigner+ Board (1MB)
  2189.               PARADISE    (640x480x256) - Paradise SuperVGA Board (512K)
  2190.                           (640x400x256) - Paradise SuperVGA Board (256K)
  2191.               PGA         (640x480x256) - PGA Board
  2192.               TRIDENT     (640x480x256) - Trident-based SVGA boards (512K)
  2193.               VESA       (1024x768x256) - VESA SVGA Interface (1MB) (test)
  2194.  
  2195.     PALette directory
  2196.               Sets the default palette directory.  This is used with the
  2197.               PAL LOAD command.  If PAL LOAD is used with no parameters,
  2198.               IMDISP will go to the default palette directory and display
  2199.               the files there.
  2200.  
  2201.     BUFfers directory
  2202.               Sets the directory to hold the buffers as files instead of
  2203.               memory buffers.  Useful when not enough extended (XMS) memory
  2204.               exists to create the buffers.
  2205.  
  2206.    For example, using the default color palette and an EGA display with 16
  2207. color values available, the command "SET DNLO 100 DNHI 164" will assign DN
  2208. values below 100 to black and DN values above 164 to white, and spread the
  2209. 16 color values between the DN limits, thus each color value will represent
  2210. 4 DNs (value 0 = DN 100 to 103; value 1 - DN 104 to 107, etc.).
  2211.  
  2212.    If values other than the default are used then the images will display
  2213. more slowly because scaling divisions are required.  SET with no parameters
  2214. will display the current values.
  2215.  
  2216.    The DNLO and DNHI values are reset to the minimum and maximum for a
  2217. given pixel size when a FILE command is issued.
  2218.  
  2219.  
  2220. 4.5.30 SLANT
  2221.  
  2222.  
  2223.    SLANT displays the image slanted either to the left or right.  This is
  2224. done by shifting each line of the image by 1 pixel.  It is particularly
  2225. useful for finding errors in image headers.
  2226.  
  2227.  
  2228.    Examples:
  2229.  
  2230.       SLANT                (slants image to the right)
  2231.       SLANT LEFT
  2232.  
  2233.  
  2234. 4.5.31 STRETCH
  2235.  
  2236.  
  2237.    STRETCH sets the palette to a gray scale stretched between the two
  2238. specified pixel values.  Stretch is most useful on the PGA display where 16
  2239. gray levels are available.  On the EGA display the stretch command
  2240. activates the gray level palette which provides only 4 gray levels.  Use
  2241. the PAL PS 0 command to return the display to the default palette after
  2242. performing a stretch.
  2243.  
  2244.    STRETCH takes the following keywords :
  2245.  
  2246.     LOW n
  2247.     HIGh n   the low and high DN values of the stretch.
  2248.  
  2249.  
  2250.    These pixel values refer to the DN values in the current image display,
  2251. not necessarily in the original image (scaling may have been involved). For
  2252. example with the EGA display the DN values in the display range from 0 to
  2253. 15, even if a byte image is being displayed.
  2254.  
  2255.    The STRETCH command is not recommended for use on EGA systems.
  2256.  
  2257.  
  2258. 4.5.32 SYSTEM
  2259.  
  2260.  
  2261.    The SYSTEM command is used to send a command to MS-DOS.
  2262.  
  2263.    For example "SYS L:" will set the L: drive as the current default drive.
  2264. If there is not enough memory available for the system command to be
  2265. executed an error message is displayed.  The SYS command will not work on
  2266. floppy disk systems unless the file "COMMAND.COM" is present on the floppy
  2267. disk with the IMDISP program.
  2268.  
  2269.    The SYSTEM command in this version of IMDISP will attempt to free as
  2270. much of memory as possible, by swapping most of the program to scratch
  2271. space.  It tries to find Extended memory (XMS), Expanded memory (EMS) or
  2272. disk space, in that order.  If it succeeds, only a small amount of IMDISP
  2273. remains in memory, leaving far more memory for DOS functions that previous
  2274. versions.  If the attempt to swap fails, the program will try to swap to
  2275. DOS with the available memory.  Currently, you must have about the same
  2276. amount of free XMS, EMS or disk space as you have memory free before
  2277. running IMDISP (i.e., IMDISP allocates all available memory to itself when
  2278. it starts, and requires that much scratch space when swapping out).
  2279.  
  2280.    The swap process, if it attempts to write out to a scratch disk file,
  2281. will use the directory specified by the environment variable IMBROWSE. If
  2282. IMBROWSE doesn't exist, IMDISP will write the scratch file to the root
  2283. directory of drive C:.  The scratch file is deleted when you return to
  2284. IMDISP (using the EXIT command at the DOS prompt).
  2285.  
  2286.  
  2287. 4.5.33 TEXT
  2288.  
  2289.  
  2290.    The text command can be used to display a string of text on the screen.
  2291. The text string can be entered on the command line, enclosed in apostrophes
  2292. or quotes (e.g., TEXT `This is a text string').  If the text string is not
  2293. entered on the command line the program will prompt for the string to be
  2294. displayed.
  2295.  
  2296.    Once the command is issued and the text string entered the program is
  2297. placed in CURSOR mode so that the display position can be selected. This is
  2298. done by using the arrow keys to move the cursor to the desired location.
  2299. After the position is selected, the user types a period (.) or carriage
  2300. return and the text will be written on the display screen.
  2301.  
  2302.    The TEXT command has one argument and two optional keywords.
  2303.  
  2304.    LINe      The line number to position the text at.
  2305.    SAMple    The sample number to position the text at.
  2306.    NOPrompt  Will display text without the command line prompt.
  2307.  
  2308.    'text...' The text string to be printed, enclosed in quotes or
  2309.              apostrophes.
  2310.  
  2311.    The text command writes over image data in the display and refresh
  2312. buffer, thus the underlying portion of the image is lost.
  2313.  
  2314.  
  2315. 4.5.34 TYPE
  2316.  
  2317.  
  2318.    The TYPE command is used to type the contents of a text file on the
  2319. display screen, using the standard MS-DOS type command.
  2320.  
  2321.    Its argument is passed to MS-DOS for execution.  At the end of the type
  2322. operation the screen will display "Type carriage return to continue:" which
  2323. will return to the IMDISP command mode.  If there is not enough memory
  2324. available for the system command to be executed an error message is
  2325. displayed.
  2326.  
  2327.  
  2328. 4.5.35 NEG
  2329.  
  2330.  
  2331.    The NEG command is used to invert the current color palette, turning the
  2332. image into a negative.   It takes no keywords or arguments.
  2333.  
  2334.  
  2335. 4.5.36 PLOT
  2336.  
  2337.    The PLOT command is used to draw plots of image lines and spectra on the
  2338. screen.  If the current file is an image, you must specify which line you
  2339. wish to plot.
  2340.  
  2341.    PLOT takes the following keywords:
  2342.  
  2343.     LIN n      plot line n of the image (required for 2-D files)
  2344.  
  2345.     SYMbol x   draw the plot using character x instead of connecting the
  2346.                points with a line
  2347.  
  2348.     ZOOm       prompt user to zoom in on a region of the plot after it is
  2349.                drawn
  2350.  
  2351.     OVErlay    overplot - do not erase the current plot
  2352.  
  2353.     MAX n      set the maximum y value in the plot
  2354.  
  2355.     MIN n      set the minimum y value in the plot
  2356.  
  2357.     COLor n    use DN value n to plot the data
  2358.  
  2359.     SPEctral   analyze the plotted spectrum by doing baseline removal and
  2360.                integrating line flux.
  2361.  
  2362.   Example:  to compare lines 200 and 210 of the current image on the same
  2363. vertical scale, first plot line 200 (as a line) with the command
  2364.  
  2365.     PLOT LINE 200 MIN 0 MAX 255
  2366.  
  2367.    Now overlay the plot of line 210 using "+" signs and color 10 of the
  2368. current palette with the command
  2369.  
  2370.     PLOT LINE 210 OVERLAY MIN 0 MAX 255 COLOR 10 SYMBOL +
  2371.  
  2372.  
  2373. 4.5.37  WINDOW
  2374.  
  2375.  
  2376.    The WINDOW command lets the user define a subimage with the cursor keys
  2377. or a mouse.  The mouse button (or enter key) sets the starting point and
  2378. then the lower corner is "dragged" to the desired position.  The window
  2379. stays in effect until turned off with the CANCEL subcommand.
  2380.  
  2381.    WINDOW takes the following subcommands:
  2382.  
  2383.     CANCEL      cancels the defined window and sets commands back to the
  2384.                 full screen
  2385.  
  2386.     S1 n
  2387.     S2 n        defines the starting and ending samples of the window
  2388.  
  2389.     L1 n
  2390.     L2 n        defines the starting and ending lines of the window
  2391.  
  2392.  
  2393. 4.6 OTHER UTILITY PROGRAMS
  2394.  
  2395.  
  2396.    There are several utility programs also provided on the distribution
  2397. disk.  These programs can read PDS labeled, VICAR2 labeled, or unlabeled
  2398. images.  The output images are always written with PDS ODL labels.  The
  2399. programs prompt for the necessary input values.
  2400.  
  2401.  
  2402. 4.6.1 COPIM
  2403.  
  2404.  
  2405.    COPIM is a simple image copying program.  It can copy the whole image,
  2406. for example to put PDS labels on a foreign image), or extract a window from
  2407. the image.  It can subsample the image with an integral subsampling factor.
  2408. The program prompts for the input and output file names, the window to
  2409. extract (just type return for the whole image), and the subsampling factor
  2410. (the default is 1).  If the input file is not in VICAR2 or PDS image format
  2411. the program will also prompt for the number of lines and samples, pixel
  2412. size and header size of the image.
  2413.  
  2414.    For example, to extract the first 100 lines and samples from the file
  2415. LOGO.IMG the following commands would be used:
  2416.  
  2417.    COPIM
  2418.    Input Image: LOGO.IMG
  2419.    Lines: 350 Samples: 340 Bits per pixel: 1
  2420.    Output Image: LOGOSUB.IMG
  2421.    Starting line and sample, number of lines and samples:
  2422.    1 1 100 100
  2423.    Line Subsampling factor (1): 1
  2424.    Sample Subsampling factor(1): 1
  2425.  
  2426.  
  2427. 4.6.2 CONVERT
  2428.  
  2429.  
  2430.    CONVERT is simple pixel format conversion program.  It converts an image
  2431. to an integer (16 bits), byte (8 bits), nibble (4 bits), or binary (1 bit)
  2432. image.  It can also perform a user specified scaring.  The program prompts
  2433. for the input and output file names, the output format (must be 1,4,8, or
  2434. 16 bits), and the input and output numerical ranges for scaling.  The
  2435. default scaling values are appropriate for the data types being used.
  2436.  
  2437.    For example, to convert MONTAGE.IMG to an 8-bit per pixel image and
  2438. scale the output pixels evenly between the values of 0 and 127 the
  2439. following commands would be used:
  2440.  
  2441.    CONVERT
  2442.    Input Image: MONTAGE.IMG
  2443.    Lines : 350    Samples : 640 Bits per pixel : 4
  2444.    Output Image: MONTBIG.IMG
  2445.    Output bits per pixel (1, 4, 8, 16) : 8
  2446.    Input DN range (O 15) :
  2447.    Output DN range (O 255) : 0 127
  2448.  
  2449.  
  2450.                                  Chapter 5
  2451.  
  2452.                                   CREDITS
  2453.  
  2454.    IMDISP is maintained and updated (since version 4.4) by a small group of
  2455. volunteers -- Mike Martin, Ron Baalke (JPL) and Archie Warnock (Hughes STX
  2456. Corp).  It was originally written by Mike Martin, Frank Evans and Dan
  2457. Nakamura of the Jet Propulsion Lab.  The plotting code was written by Ed
  2458. Esfandari (Interferometrics).  Paradise and Trident video drivers were
  2459. added by Gregg Gunnells of the USGS. Jerry McFaul (USGS), Ed Grayzeck (U of
  2460. MD) and Nick Beser (JHU/APL) have been valiant testers of the program
  2461. through its many iterations, and have made many suggestions for
  2462. improvements along the way.
  2463.  
  2464.    IMDISP would not have its current capabilities if it weren't for the
  2465. generous efforts of several software authors who have seen fit to donate
  2466. their work into the public domain.  Through their work, we are able to keep
  2467. IMDISP in the public domain, free to anyone who wants it.  We want to
  2468. publicly thank all of them here:
  2469.  
  2470. Gershon Elber     - GIF I/O routines (GIF_LIB.ZIP)
  2471. Michael Walraven  - High resolution timer (TIMERHI.ZIP)
  2472. Max Medley        - Mouse interface code
  2473. James Birdsall    - EMS, XMS allocation code (EMSLB215.ZIP, XMSLB121.ZIP)
  2474. Marty Del Vecchio - EMS/XMS swap routines (SWAP300.ZIP)
  2475.  
  2476.    And, of course, we would also like to thank our users, from whom we
  2477. continue to receive ideas, bug reports and fixes.  They exercise the
  2478. program in ways we never imagined.
  2479.  
  2480. GIF and 'Graphics Interchange Format' are trademarks of CompuServe,
  2481. Incorporated, an H&R Block Company.
  2482.  
  2483.  
  2484.                                   Appendix
  2485.  
  2486.                               COMMAND SUMMARY
  2487.  
  2488.  
  2489.    Within this command summary listing, brackets ([]) indicate optional
  2490. parameters or keywords.  Filename is the name of a file in the current
  2491. directory or a fully qualified filename which can include drive letter and
  2492. pathname.  Directory name is an MS-DOS directory path specification, a
  2493. valid directory mask a specification containing wild card characters (*, ?)
  2494. per MS-DOS rules for wildcard use in the DIRECTORY command.  The symbol "n"
  2495. is used to indicate an integer value.
  2496.  
  2497.   BATCH        [filename]
  2498.   BRIGHTEN     [n]
  2499.   BROWSE       [directory mask] [SIZe n] [SUB n] [NOLabel]  [DNLOw n]
  2500.                [DNHIgh n] [PAUse n] [ALL] [SELect] [FILe] [BUFFERS]
  2501.                [AUToset n]
  2502.   CD           [directory name] [..]
  2503.   CHDIR        [directory name] [..]
  2504.   COPY         [buffer [TO buffer]] [FILE]
  2505.   CURSOR       [DSL n] [DSS n]
  2506.   DARKEN       [n]
  2507.   DIRECTORY    [directory mask] [/w]
  2508.   DISPLAY      [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENTer] [DSL n]
  2509.                [DSS n] [ZOOm] [FLIP] [NOPrompt] [NOMemory] [AUToset]
  2510.                [SOUrce] [CURsor] [buffer]
  2511.   ENHANCE      [BAAlke] [CONvolution n] [EDGe n] [HIGh n] [HIStogram]
  2512.                [LOG n] [MEAn n] [MEDian] [POWer n] [STAir n] [SMEar]
  2513.                [SCReen] [UNSharp]
  2514.   ERASE        [REFRESH] [buffer]
  2515.   EXIT         [NOClear]
  2516.   FILE         [filename[.GIF]] ["CD:mm:ss:bb"] [NOMemory]
  2517.   HELP         [command name]
  2518.   HISTOGRAM    [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENter]
  2519.                [VOYager] [VIKing] [buffer]
  2520.   LABEL
  2521.   LOG          [ON] [FILe filename] [CLOse] [OFF]
  2522.   MASK         [LO n [WITH n]] [HI n [WITH n]]
  2523.   MENU         [filename]
  2524.   MERGE        [buffer [scale] [WITH buffer [scale] [TO buffer]]] [FILE]
  2525.   NEG
  2526.   OVERLAY      [MAXLAT n] [MAXLON n] [MINLAT n] [MINLON n] [LEGend]
  2527.   PALETTE      [EDIT n] [PS n] [LOAd filename] [SAVe filename] [DISplay]
  2528.                [ERAse] [CYC n [FAST] [TIME n]]
  2529.   PERSPECTIVE  [SL n] [SCR]
  2530.   PLOT         [LINE n] [SYMBOL x] [COLOR n] [MAX n] [MIN n] [OVERLAY]
  2531.                [ZOOM] [SPECTRAL]
  2532.   PROFILE
  2533.   QUIT         [NOClear]
  2534.   REFRESH
  2535.   ROTATE       [n] [SCReen] [NOFill] [CLIp]
  2536.   SAVE         filename[.GIF] [FORmat fmt] [SL n] [SS n] [NL n] [NS n] [BP n]
  2537.                [REFRESH]
  2538.   SET          [DNLO n] [DNHI n] [BROwse filename] [DIS name] [NS n]
  2539.                [PAL dir] [REFresh ON/OFF] [DELay ON/OFF] [PROmpt ON/OFF]
  2540.                [BUFFERS dir]
  2541.   SLANT        [RIGht] [LEFt]
  2542.   STRETCH      [LO n] [HI n]
  2543.   SYSTEM       [MS-DOS command]
  2544.   TEXT         [LINe n] [SAMple n] "text" or 'text' [NOPrompt]
  2545.   TYPE         filename
  2546.   WINDOW       [CANcel] [S1 n] [L1 n] [S2 n] [L2 n]
  2547.  
  2548.  
  2549.                     MS-DOS ENVIRONMENT VARIABLE SUMMARY
  2550.  
  2551.     All of these environment variables control options for IMDISP.
  2552.  
  2553. SET IMDISP=<display-type>
  2554. SET IMBROWSE=<subdirectory>
  2555. SET IMPALETTE=<subdirectory>
  2556. SET IMREFRESH=<subdirectory>
  2557. SET IMHELP=<subdirectory and/or filename>
  2558.  
  2559.